Lints
Categories:
Common scripts including running linters are stored in the _scripts repository. By using those scripts, following linting should be applied for all AILERON projects. It depends on the project which lints are applied.
Go
fmt
go fmt should be applied for all go codes.
See the following resources.
- Makefile: makefiles/go.mk
- Github Action: go-fmt/action.yaml
This command runs prettier when using the Makefile.
make go-fmt
vet
go vet should be applied for all go codes.
See the following resources.
- Makefile: makefiles/go.mk
- Github Action: go-vet/action.yaml
This command runs prettier when using the Makefile.
make go-vet
golangci-lint
golangci-lint is widely used linters for go projects. It should be applied for all AILERON Projects. Applied rule sets depends on the projects.
See the following resources.
- Makefile: makefiles/golangci-lint.mk
- Github Action: golangci-lint/action.yaml
This command runs prettier when using the Makefile.
make golangci-lint-run
Markdown
markdownlint
markdownlint should be applied for all markdown documents.
See the following resources.
- Makefile: makefiles/markdownlint.mk
- Github Action: markdownlint/action.yaml
- VSCode Plugin: markdownlint
This command runs prettier when using the Makefile.
make markdownlint-run
JSON/YAML/TOML/XML
prettier
Prettier should be applied for json, yaml, toms and xml documents if applicable.
See the following resources.
- Makefile: makefiles/prettier.mk
- Github Action: prettier/action.yaml
- VSCode Plugin: Prettier - Code formatter
This command runs prettier when using the Makefile.
make prettier-run
ShellScript
shellcheck
ShellCheck is widely used shell linter. It should be applied for shell scripts if applicable.
See the following resources.
- Makefile: makefiles/shellcheck.mk
- Github Action: shellcheck/action.yaml
- VSCode Plugin: ShellCheck
This command runs shecllcheck when using the Makefile.
make shellcheck-run
shfmt
shfmt formats shell scripts. It should be applied for shell scripts if applicable.
See the following resources.
- Makefile: makefiles/shfmt.mk
- Github Action: shfmt/action.yaml
- VSCode Plugin: shfmt
This command runs shfmt when using the Makefile.
make shfmt-run
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.