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

Feat megalint introduction. #492

Merged
merged 20 commits into from
Aug 22, 2022
Merged

Feat megalint introduction. #492

merged 20 commits into from
Aug 22, 2022

Conversation

javydekoning
Copy link
Contributor

Issue #, if available:
#491

Description of changes:
This introduces the first iteration of linters as per #491 and includes some style fixes.

+----MATCHING LINTERS-------+------------------+----------------+------------+
| Descriptor     | Linter   | Criteria         | Matching files | Format/Fix |
+----------------+----------+------------------+----------------+------------+
| CLOUDFORMATION | cfn-lint | .yml|.yaml|.json | 23             | no         |
| DOCKERFILE     | hadolint | Dockerfile       | 1              | no         |
| JAVASCRIPT     | standard | .js              | 1              | no         |
| JSON           | jsonlint | .json            | 9              | no         |
| JSON           | v8r      | .json            | 9              | no         |
| JSON           | prettier | .json            | 9              | no         |
| SPELL          | misspell |                  | 75             | no         |
| TERRAFORM      | tflint   | .tf              | 3              | no         |
| YAML           | yamllint | .yml|.yaml       | 61             | no         |
+----------------+----------+------------------+----------------+------------+

✅ Linted [DOCKERFILE] files with [hadolint] successfully - (0.08s)
- Using [hadolint v2.10.0] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/dockerfile_hadolint
- MegaLinter key: [DOCKERFILE_HADOLINT]
- Rules config: identified by [hadolint]
- Number of files analyzed: [1]

✅ Linted [JSON] files with [jsonlint] successfully - (0.4s)
- Using [jsonlint v11.6.0] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/json_jsonlint
- MegaLinter key: [JSON_JSONLINT]
- Rules config: identified by [jsonlint]
- Number of files analyzed: [9]

✅ Linted [JSON] files with [prettier] successfully - (1.4s)
- Using [prettier v2.7.1] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/json_prettier
- MegaLinter key: [JSON_PRETTIER]
- Rules config: identified by [prettier]
- Number of files analyzed: [9]

✅ Linted [JAVASCRIPT] files with [standard] successfully - (1.97s)
- Using [standard v15.0.1] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/javascript_standard
- MegaLinter key: [JAVASCRIPT_STANDARD]
- Rules config: identified by [standard]
- Number of files analyzed: [1]

✅ Linted [SPELL] files with [misspell] successfully - (0.26s)
- Using [misspell v0.3.4] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/spell_misspell
- MegaLinter key: [SPELL_MISSPELL]
- Rules config: identified by [misspell]
- Number of files analyzed: [75]

✅ Linted [YAML] files with [yamllint] successfully - (1.93s)
- Using [yamllint v1.27.1] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/yaml_yamllint
- MegaLinter key: [YAML_YAMLLINT]
- Rules config: [/.yamllint.yml]
- Number of files analyzed: [61]

✅ Linted [CLOUDFORMATION] files with [cfn-lint] successfully - (6.0s)
- Using [cfn-lint v0.61.5] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/cloudformation_cfn_lint
- MegaLinter key: [CLOUDFORMATION_CFN_LINT]
- Rules config: [.cfnlintrc.yml]
- Number of files analyzed: [23]

✅ Linted [TERRAFORM] files with [tflint] successfully - (13.07s)
- Using [tflint v0.35.0] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/terraform_tflint
- MegaLinter key: [TERRAFORM_TFLINT]
- Rules config: [.tflint.hcl]
- Number of files analyzed: [3]
[Pre][TERRAFORM_TFLINT] run: [tflint --init --config /action/lib/.automation/.tflint.hcl] in cwd [/]
[Pre][TERRAFORM_TFLINT] Installing `aws` plugin...
Installed `aws` (source: github.com/terraform-linters/tflint-ruleset-aws, version: 0.13.3)


✅ Linted [JSON] files with [v8r] successfully - (25.56s)
- Using [v8r v0.13.0] https://oxsecurity.github.io/megalinter/latest/v6/descriptors/json_v8r
- MegaLinter key: [JSON_V8R]
- Rules config: identified by [v8r]
- Number of files analyzed: [9]


+----SUMMARY--------+----------+---------------+-------+-------+--------+--------------+
| Descriptor        | Linter   | Mode          | Files | Fixed | Errors | Elapsed time |
+-------------------+----------+---------------+-------+-------+--------+--------------+
| ✅ CLOUDFORMATION | cfn-lint | list_of_files |    23 |       |      0 |         6.0s |
| ✅ DOCKERFILE     | hadolint | file          |     1 |       |      0 |        0.08s |
| ✅ JAVASCRIPT     | standard | list_of_files |     1 |       |      0 |        1.97s |
| ✅ JSON           | jsonlint | list_of_files |     9 |       |      0 |         0.4s |
| ✅ JSON           | prettier | list_of_files |     9 |       |      0 |         1.4s |
| ✅ JSON           | v8r      | list_of_files |     9 |       |      0 |       25.56s |
| ✅ SPELL          | misspell | list_of_files |    75 |       |      0 |        0.26s |
| ✅ TERRAFORM      | tflint   | file          |     3 |       |      0 |       13.07s |
| ✅ YAML           | yamllint | list_of_files |    61 |       |      0 |        1.93s |
+-------------------+----------+---------------+-------+-------+--------+--------------+

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Collaborator

@sbkok sbkok left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this.
I've added a few comments, some that need discussion, happy to jump in a call if needed.

.github/workflows/mega-linter.yml Outdated Show resolved Hide resolved
.github/workflows/mega-linter.yml Outdated Show resolved Hide resolved
.github/workflows/mega-linter.yml Outdated Show resolved Hide resolved
.github/workflows/mega-linter.yml Outdated Show resolved Hide resolved
.mega-linter.yml Show resolved Hide resolved
.yamllint.yml Show resolved Hide resolved
@javydekoning
Copy link
Contributor Author

@sbkok this is complete and ready for another review.

Copy link
Collaborator

@sbkok sbkok left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for adding those instructions in the docs and updating the build status images too!

@sbkok sbkok requested a review from StewartW August 19, 2022 12:47
@javydekoning javydekoning merged commit 8c8fc95 into awslabs:master Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants