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

15 standardize linting #17

Merged
merged 10 commits into from
Aug 18, 2023
Merged

15 standardize linting #17

merged 10 commits into from
Aug 18, 2023

Conversation

drernie
Copy link
Member

@drernie drernie commented Aug 18, 2023

No description provided.

@drernie drernie linked an issue Aug 18, 2023 that may be closed by this pull request
@drernie
Copy link
Member Author

drernie commented Aug 18, 2023

| ✅ BASH | shfmt | list_of_files | 1 | 1 | 0 | 0.02s |
http://megalinter.io/6.9.1/descriptors/bash_shfmt/

@sir-sigurd I'd like to standardize all our coding style conventions around megalinter automation.
Can you live with this style for shell scripts, or should we change the defaults?
https://github.com/mvdan/sh

Printer options:

  -i,  --indent uint       0 for tabs (default), >0 for number of spaces
  -bn, --binary-next-line  binary ops like && and | may start a line
  -ci, --case-indent       switch cases will be indented
  -sr, --space-redirects   redirect operators will be followed by a space
  -kp, --keep-padding      keep column alignment paddings
  -fn, --func-next-line    function opening braces are placed on a separate line

P.S. I fixed the execute bit, thanks for the catch.

[GitHub Comment Reporter] Unable to post pull request comment: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/issues/comments#create-an-issue-comment"}.
To enable this function, please :
1. Create a Personal Access Token (https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token)
2. Create a secret named PAT with its value on your repository (https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)3. Define PAT={{secrets.PAT}} in your GitHub action environment variables
[Updated Sources Reporter] copied 3 fixed source files in folder /github/workspace/megalinter-reports/updated_sources.
Download it from artifacts then copy-paste it in your local repo to apply linters updates
@drernie
Copy link
Member Author

drernie commented Aug 18, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.01s
✅ BASH bash-exec 1 0 0.01s
✅ BASH shellcheck 1 0 0.03s
✅ BASH shfmt 1 0 0 0.01s
✅ MAKEFILE checkmake 1 0 0.01s
✅ MARKDOWN markdownlint 2 0 0 0.32s
✅ MARKDOWN markdown-table-formatter 2 0 0 0.23s
✅ PYTHON black 7 0 0 0.66s
✅ PYTHON flake8 7 0 0.37s
✅ PYTHON isort 7 0 0 0.23s
✅ PYTHON ruff 7 0 0 0.02s
✅ REPOSITORY checkov yes no 8.89s
✅ REPOSITORY gitleaks yes no 0.14s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY secretlint yes no 0.58s
✅ YAML prettier 2 2 0 0.47s
✅ YAML v8r 2 0 2.39s
✅ YAML yamllint 2 0 0.19s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@drernie
Copy link
Member Author

drernie commented Aug 18, 2023

FYI, it seems like 'shfmt' really does want to remove the execute bit, which might be a security recommendation.

Also, this made me realize I have no clue when "deploy.sh" is called, or by whom, so I have no idea how to test (or configure) it. Can you enlighten me?

),
)
benchling_tenant = troposphere.Parameter(
"BenchlingTenant",
template=cft,
Type="String",
AllowedPattern=r"^[^/]+$",
Description="Benchling tenant name, i.e. $BenchlingTenant in "
+ "https://$BenchlingTenant.benchling.com",
Description="Benchling tenant name, i.e. $BenchlingTenant in " + "https://$BenchlingTenant.benchling.com",
Copy link
Member

Choose a reason for hiding this comment

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

why not?

Suggested change
Description="Benchling tenant name, i.e. $BenchlingTenant in " + "https://$BenchlingTenant.benchling.com",
Description="Benchling tenant name, i.e. $BenchlingTenant in https://$BenchlingTenant.benchling.com",

@drernie drernie merged commit 0b5565b into main Aug 18, 2023
4 checks passed
@drernie drernie deleted the 15-standardize-linting branch August 18, 2023 16:14
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.

Standardize linting
2 participants