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

Improved Megalint Config and applied auto fixes #1302

Merged
merged 7 commits into from
Sep 5, 2022

Conversation

Ilyesbdlala
Copy link
Member

@Ilyesbdlala Ilyesbdlala commented Aug 11, 2022

Description

This PR does the following:

  • Changed the mega-linter to opt-in mode We enable wanted linters, instead of disabling unwanted ones. This results into not having multiple linters for each language. Multiple linters for each language is unnecessary and results into conflicts between linters.
  • Disabled brackedSpacing in the YAML linter. Adding spaces between the brackets results in the helm charts failing
  • Applied megalinter automatic fixes. Lint issues still exist that can't be auto fixed, but should be from so on resolved by the “leave it better than you found it” principle during development.

Now should the Megalinter have a Warning in future PRs, the developer would know that it's either an issue that was newly introduced or an issue that could not at this time be auto-fixed, and should be manually resolved.

Replaces #1295. CI only looks failed due CodeClimate which is no longer used in Repo.
Closes https://github.com/secureCodeBox/internal/issues/83

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure that all your commits are signed-off and that you are added to the Contributors file.
  • Make sure that all CI finish successfully.
  • Optional (but appreciated): Make sure that all commits are Verified.

Sorry, something went wrong.

Ilyes Ben Dlala and others added 4 commits August 11, 2022 14:11
We enable wanted linters, instead of disabling unwanted ones
This results into not having multiple linters for each language, which is unneccesary and results into conflicts between linters

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
Adding spaces between the brackets results in the helm charts failing

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
Lint issues still exists that can't auto fixed  but should be from so on resolved by the "leave it better than you found it" principle during development.

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
@github-actions
Copy link

github-actions bot commented Aug 11, 2022

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.04s
✅ BASH shfmt 14 0 0.02s
✅ DOCKERFILE hadolint 1 0 0.12s
⚠️ GO golangci-lint 5 5 11.91s
⚠️ JAVA checkstyle 2 2 5.17s
⚠️ JAVASCRIPT eslint 5 1 0.8s
✅ JSON eslint-plugin-jsonc 1 0 1.88s
⚠️ PYTHON black 36 1 1.43s
✅ SPELL misspell 241 0 2.47s
⚠️ TYPESCRIPT eslint 1 1 0.46s
⚠️ YAML prettier 176 1 11.58s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

Linter formatting of .test.js broke snapshot

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@Ilyesbdlala Ilyesbdlala requested a review from the-simmon August 11, 2022 13:45
@rseedorff rseedorff added this to the v3.15.0 milestone Sep 1, 2022
@J12934 J12934 merged commit 9142664 into main Sep 5, 2022
@J12934 J12934 deleted the maintenance/megalint-config-apply branch September 5, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants