Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KPCF v1.1.0 publishing #23

Merged
merged 59 commits into from
Nov 5, 2018
Merged

KPCF v1.1.0 publishing #23

merged 59 commits into from
Nov 5, 2018

Conversation

Dubjunk
Copy link
Collaborator

@Dubjunk Dubjunk commented Nov 4, 2018

No description provided.

Copy link
Member

@Wyqer Wyqer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small comments and suggestions you could think about

"_import",
"_importName",
"_export",
"_exportName",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These four local variables don't need to be added here.
The issue that SQF Lint marked it as undefined is fixed.
Ref: SkaceKamen/vscode-sqflint#36


// Black & whitelisting
_classNames = _classNames - KPCF_blacklistedItems;
_classNames append KPCF_whitelistedItems;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be only one or another? 🤔

If you get _classnames by crawling, shouldn't it already have all whitelistedItems registered?

Maybe something like (pseudo code)
If elements in whitelistedItems, then _classnames = whitelistedItems
else crawl the configs to get all available items and remove everything which is listed in blacklistedItems

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitelisting is implemented as some kind of security feature, thought about items that won't be recognized like they should.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see.
As far as I know you've described it like that also in the config file. 👍

};
};
};
} forEach _classNames;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't directly say if it's really more performance friendly or if pushBackUnique is really noticeable performance heavier then pushBack, but you could think about:

As it seems you expecting to have some doubled classnames in the array (as you use pushBackUnique) you could sort out every doubled, etc. entries before the forEach or as forEach argument with
forEach (_classnames arrayIntersect _classnames); and use just pushBack in the switch.

Ref (example 2): https://community.bistudio.com/wiki/arrayIntersect

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice idea, implemented it like that !

Wyqer and others added 10 commits November 5, 2018 20:12
Co-Authored-By: Dubjunk <31448659+Dubjunk@users.noreply.github.com>
Co-Authored-By: Dubjunk <31448659+Dubjunk@users.noreply.github.com>
Co-Authored-By: Dubjunk <31448659+Dubjunk@users.noreply.github.com>
Co-Authored-By: Dubjunk <31448659+Dubjunk@users.noreply.github.com>
Co-Authored-By: Dubjunk <31448659+Dubjunk@users.noreply.github.com>
Co-Authored-By: Dubjunk <31448659+Dubjunk@users.noreply.github.com>
@Dubjunk Dubjunk merged commit f9a1e9c into master Nov 5, 2018
@Dubjunk Dubjunk deleted the KPCF-v1.1.0 branch November 5, 2018 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants