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

Introduce super-linter action for linting JSON, XML, ENV files and bash_exec #4295

Closed
wants to merge 3 commits into from

Conversation

bowenliang123
Copy link
Contributor

@bowenliang123 bowenliang123 commented Feb 10, 2023

Why are the changes needed?

  • introduce action/super-linter with multiple linters, (https://github.com/marketplace/actions/super-linter)
  • using the smaller size version of image github/super-linter/slim for faster image pulling
  • enable linting for bash_exec for checking executable of bash scripts, with fixed tools/spark-block-cleaner/kubernetes/docker/entrypoint.sh
  • enable integrity checks for JSON files in JSONC style
  • enable integrity checks for XML files
  • enable linting for ENV files

How was this patch tested?

  • Pass CI jobs

@bowenliang123
Copy link
Contributor Author

Fix https://github.com/apache/kyuubi/actions/runs/4393204237/jobs/7693453883#step:4:29

2023-03-11 16:40:51 [WARN]   Warnings found in [bash-exec] linter!
2023-03-11 16:40:51 [WARN]   Error: File:[/github/workspace/tools/spark-block-cleaner/kubernetes/docker/entrypoint.sh] is not executable

@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Mar 14, 2023

The follow-up todos after this PR:

@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Mar 14, 2023

The licence header in JSON files like kyuubi-server/web-ui/tsconfig.json, as comments are not supported originally in JSON. As in Spark, eslint.json is also remained without licence header.

/github/workspace/kyuubi-server/web-ui/tsconfig.json
  1:1  error  Parsing error: Unexpected comment

✖ 1 problem (1 error, 0 warnings)

@bowenliang123 bowenliang123 changed the title introduce super-linter action for multiple linters Introduce super-linter action for linting JSON, XML, bash_exec bit Mar 14, 2023
@bowenliang123 bowenliang123 changed the title Introduce super-linter action for linting JSON, XML, bash_exec bit Introduce super-linter action for linting JSON, XML, ENV files and bash_exec Mar 14, 2023
@bowenliang123 bowenliang123 marked this pull request as ready for review March 14, 2023 11:57
@pan3793
Copy link
Member

pan3793 commented Mar 14, 2023

Actually, the extended JSON format supports comments syntax.

@bowenliang123
Copy link
Contributor Author

bowenliang123 commented Mar 14, 2023

Actually, the extended JSON format supports comments syntax.

OK, used JSONC linter allowing comments in json files instead.

@bowenliang123 bowenliang123 changed the title Introduce super-linter action for linting JSON, XML, ENV files and bash_exec Introduce super-linter action for linting JSON, XML, ENV files and bash_exec Mar 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

Merging #4295 (43787e2) into master (8267108) will decrease coverage by 0.04%.
The diff coverage is n/a.

❗ Current head 43787e2 differs from pull request most recent head 321d249. Consider uploading reports for the commit 321d249 to get more accurate results

@@             Coverage Diff              @@
##             master    #4295      +/-   ##
============================================
- Coverage     53.37%   53.34%   -0.04%     
  Complexity       13       13              
============================================
  Files           571      571              
  Lines         31294    31294              
  Branches       4219     4219              
============================================
- Hits          16703    16693      -10     
- Misses        13012    13020       +8     
- Partials       1579     1581       +2     

see 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bowenliang123
Copy link
Contributor Author

It's ready for review. Have a check when you have time.
cc @pan3793

@bowenliang123 bowenliang123 self-assigned this Mar 18, 2023
@bowenliang123 bowenliang123 added this to the v1.8.0 milestone Mar 18, 2023
@bowenliang123 bowenliang123 deleted the superlinter-action branch March 18, 2023 13:55
@bowenliang123
Copy link
Contributor Author

Thanks, merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:infra license, community building, project builds, asf infra related, etc. module:kubernetes module:spark
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants