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 swiftlint #1757

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Fix swiftlint #1757

wants to merge 7 commits into from

Conversation

nvuillam
Copy link
Member

Fixes #440

@nvuillam
Copy link
Member Author

nvuillam commented Aug 17, 2022

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ BASH bash-exec 7 0 0.02s
✅ BASH shellcheck 7 0 0.32s
✅ BASH shfmt 7 0 0 0.02s
✅ COPYPASTE jscpd yes no 2.74s
✅ DOCKERFILE hadolint 103 0 19.9s
✅ JSON eslint-plugin-jsonc 20 0 0 2.46s
✅ JSON jsonlint 18 0 0.25s
✅ JSON v8r 20 0 12.14s
⚠️ MARKDOWN markdownlint 281 0 5 5.11s
✅ MARKDOWN markdown-link-check 281 0 6.12s
✅ MARKDOWN markdown-table-formatter 281 0 0 7.62s
✅ OPENAPI spectral 1 0 0.94s
⚠️ PYTHON bandit 165 51 2.48s
✅ PYTHON black 165 0 0 3.42s
✅ PYTHON flake8 165 0 2.21s
✅ PYTHON isort 165 0 0 0.36s
✅ PYTHON mypy 165 0 113.54s
✅ PYTHON pylint 165 0 19.74s
✅ REPOSITORY checkov yes no 16.5s
✅ REPOSITORY git_diff yes no 0.02s
✅ REPOSITORY secretlint yes no 13.37s
✅ REPOSITORY trivy yes no 24.42s
✅ SPELL cspell 661 0 21.25s
✅ SPELL misspell 491 0 0 0.48s
✅ XML xmllint 3 0 0.0s
✅ YAML prettier 79 0 0 2.21s
✅ YAML v8r 22 0 29.12s
✅ YAML yamllint 80 0 1.25s

See errors details in artifact MegaLinter reports on CI Job page

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this pull request should stay open, please remove the O: stale 🤖 label or comment on the pull request.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Sep 17, 2022
@Kurt-von-Laven Kurt-von-Laven added nostale This issue or pull request is not stale, keep it open and removed O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity labels Sep 17, 2022
@echoix echoix temporarily deployed to dev October 22, 2023 00:50 — with GitHub Actions Inactive
@echoix echoix temporarily deployed to dev October 22, 2023 00:50 — with GitHub Actions Inactive
@echoix echoix temporarily deployed to dev October 22, 2023 00:50 — with GitHub Actions Inactive
@echoix echoix temporarily deployed to dev October 22, 2023 00:50 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2023

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ API spectral 2 0 3.04s
✅ BASH bash-exec 5 0 0.07s
✅ BASH shellcheck 5 0 0.14s
✅ BASH shfmt 5 0 0 0.65s
✅ COPYPASTE jscpd yes no 3.83s
✅ DOCKERFILE hadolint 130 0 16.79s
✅ JSON jsonlint 18 0 0.24s
✅ JSON v8r 20 0 30.61s
⚠️ MARKDOWN markdownlint 265 0 272 38.29s
✅ MARKDOWN markdown-table-formatter 265 0 0 141.09s
✅ OPENAPI spectral 2 0 3.26s
⚠️ PYTHON bandit 211 64 3.64s
✅ PYTHON black 211 0 0 5.75s
✅ PYTHON flake8 211 0 1.75s
✅ PYTHON isort 211 0 0 1.32s
✅ PYTHON mypy 211 0 19.46s
✅ PYTHON pylint 211 0 17.05s
✅ PYTHON ruff 211 0 0 0.75s
✅ REPOSITORY checkov yes no 43.37s
✅ REPOSITORY git_diff yes no 0.68s
⚠️ REPOSITORY grype yes 1 25.71s
✅ REPOSITORY secretlint yes no 18.24s
✅ REPOSITORY trivy yes no 20.91s
✅ REPOSITORY trivy-sbom yes no 5.95s
⚠️ REPOSITORY trufflehog yes 1 12.35s
✅ SPELL cspell 693 0 30.37s
⚠️ SPELL lychee 346 1 12.44s
✅ XML xmllint 3 0 0 0.68s
✅ YAML prettier 161 0 0 6.2s
✅ YAML v8r 102 0 195.56s
✅ YAML yamllint 162 0 2.56s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

- "--strict"
cli_lint_fix_arg_name: "--fix"
cli_lint_fix_remove_args:
- "lint"
cli_docker_image: norionomura/swiftlint
cli_docker_args:
- "-v"
- "{{WORKSPACE}}:/tmp/lint:rw"
- "$(pwd):$(pwd)"

Choose a reason for hiding this comment

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

You don't have to change the /tmp/lint. Just update the working directory to point to /tmp/lint.

Example:

docker run --rm -v /github/workspace:/tmp/lint -w /tmp/lint ghcr.io/realm/swiftlint:latest swiftlint --strict

@@ -19,16 +19,16 @@ linters:
cli_lint_extra_args:
- "lint"
cli_lint_extra_args_after:
- "--path"
- "/tmp/lint"
- "--strict"
cli_lint_fix_arg_name: "--fix"
cli_lint_fix_remove_args:
- "lint"
cli_docker_image: norionomura/swiftlint

Choose a reason for hiding this comment

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

Could we use realm swiftlint's Docker image instead?

@@ -19,16 +19,16 @@ linters:
cli_lint_extra_args:
- "lint"
cli_lint_extra_args_after:

Choose a reason for hiding this comment

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

Can we also update the examples in line 38?

@echoix
Copy link
Collaborator

echoix commented Dec 12, 2024

@Noraldeno since it is a branch from this repo, if you know a bit about swift and would want to finish it off, you can either open a new PR that targets this branch, or a PR based on this one that targets main.

Last time I updated it, it still didn't work, now there's a bit of conflicts (expected, most of the repo is generated files)

We'd love the help, it's with small contributions that we keep up with every programming environment ;)

@Noraldeno
Copy link

@Noraldeno since it is a branch from this repo, if you know a bit about swift and would want to finish it off, you can either open a new PR that targets this branch, or a PR based on this one that targets main.

Last time I updated it, it still didn't work, now there's a bit of conflicts (expected, most of the repo is generated files)

We'd love the help, it's with small contributions that we keep up with every programming environment ;)

Yes. I'll go ahead and open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nostale This issue or pull request is not stale, keep it open
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linting swift code does not work. Error: No lintable files found at paths: '/tmp/lint'
4 participants