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

Fix identical operands and always true condition #3932

Merged
merged 2 commits into from Jan 3, 2022
Merged

Fix identical operands and always true condition #3932

merged 2 commits into from Jan 3, 2022

Conversation

XhmikosR
Copy link
Contributor

@XhmikosR XhmikosR commented Jan 3, 2022

πŸŽ‰ Thanks for submitting a pull request! πŸŽ‰

Summary

Fixing more LGTM issues


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code πŸ§‘β€πŸ’». This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire πŸ”₯ (e.g. incident related), you can skip this step.
  • Read the contribution guidelines πŸ“–. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) πŸ§ͺ
  • Update or add documentation (if features were changed or added) πŸ“
  • Make sure the status checks below are successful βœ…

A picture of a cute animal (not mandatory, but encouraged)

@erezrokah erezrokah added the type: bug code to address defects in shipped code label Jan 3, 2022
@XhmikosR XhmikosR marked this pull request as ready for review January 3, 2022 15:08
@@ -17,7 +17,7 @@ const parseRawFlags = function (raw) {
const next = array[index + 1]
if (!next) {
acc[key] = true
} else if (next && next && /^-{1,2}/.test(next)) {
} else if (/^-{1,2}/.test(next)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could probably be refactored to next.startsWith('--') || next.startsWith('-'), not sure it's better though.

Copy link
Contributor

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

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

πŸ”₯

@erezrokah erezrokah enabled auto-merge (squash) January 3, 2022 17:53
@erezrokah erezrokah merged commit 863119e into netlify:main Jan 3, 2022
@XhmikosR XhmikosR deleted the identical-operands branch January 3, 2022 18:30
@XhmikosR
Copy link
Contributor Author

XhmikosR commented Jan 4, 2022

@erezrokah there's only one similar warning left: https://lgtm.com/projects/g/netlify/cli/snapshot/5b5a2104db065d78dc216937317a0b77923105d9/files/src/utils/telemetry/validation.js?sort=name&dir=ASC&mode=heatmap

I'm not super familiar with the codebase, so it'd be nice if you or someone else could take care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants