Skip to content

Commit

Permalink
Fix missing default_*.yaml values (#231)
Browse files Browse the repository at this point in the history
Address any fixes that were included in the `default_*.yaml` files that
hadn't gotten ported over. I changed the implicit plugin ref to HEAD on
this branch and got most of the existing tests to pass after porting
these changes.

We could just delete the deprecated linters (it's been a while) and
modify our tests, but I think it's fine to keep them like this for now.
This PR deprecates `terraform-validate` for the first time (had
previously been a TODO to deprecate it).

This should be the last change necessary before getting a release out.
  • Loading branch information
TylerJang27 committed Mar 29, 2023
1 parent 1f85a1e commit 19b7f84
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions actions/git/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ actions:
run: git lfs "${hook}" ${@}
triggers:
- git_hooks: [post-checkout, post-commit, post-merge, pre-push]
notify_on_error: false
17 changes: 17 additions & 0 deletions linters/rubocop/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,20 @@ lint:
version_command:
parse_regex: ${semver}
run: rubocop --version

- name: rubocop-fmt
files: [ruby, gemspec]
type: rewrite
command: [rubocop, --fix-layout, "${target}"]
direct_configs: [.rubocop.yml]
runtime: ruby
package: rubocop
success_codes: [0, 1]
formatter: true
known_good_version: 1.39.0
version_command:
parse_regex: ${semver}
run: rubocop --version
in_place: true
batch: true
deprecated: rubocop-fmt is now handled by rubocop. Please delete rubocop-fmt from your config
28 changes: 28 additions & 0 deletions linters/stylelint/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,31 @@ lint:
version_command:
parse_regex: ${semver}
run: stylelint --version

- name: stylelint-fmt
files: [css, sass]
type: rewrite
deprecated:
"'stylelint-fmt' is now handled by 'stylelint'. Please delete 'stylelint-fmt' from your
config"
is_recommended: false
command: [stylelint, --fix, "${target}"]
runtime: node
package: stylelint
success_codes: [0, 2]
direct_configs:
- .stylelintrc
- .stylelintrc.json
- .stylelintrc.yml
- .stylelintrc.yaml
- .stylelintrc.js
- .stylelintrc.cjs
affects_cache:
- package.json
- .stylelintignore
known_good_version: 14.6.1
formatter: true
version_command:
parse_regex: ${semver}
run: stylelint --version
in_place: true
26 changes: 26 additions & 0 deletions linters/taplo/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,29 @@ lint:
parse_regex: Taplo TOML Utility ${semver}
run: taplo --version
cache_results: true

- name: taplo-fmt
files: [toml]
type: rewrite
download: taplo
command: [taplo, format, "${target}"]
success_codes: [0]
cache_results: true
formatter: true
good_without_config: true
direct_configs:
- .taplo.toml
- taplo.toml
environment:
- name: PATH
list: ["${linter}"]
known_good_version: release-cli-0.6.0
version_command:
parse_regex: Taplo TOML Utility ${semver}
run: taplo --version
in_place: true
is_recommended: false
deprecated:
"'taplo-fmt' is now handled by 'taplo'. Please delete 'taplo-fmt' from your config"
# Note that we cant use batching as version 0.5.0 does not support multiple files on the
# command line (even though it claims it does).
50 changes: 50 additions & 0 deletions linters/terraform/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,53 @@ lint:
version_command:
parse_regex: ${semver}
run: terraform --version

- name: terraform-fmt
files: [terraform]
type: rewrite
command: [terraform, fmt, -no-color, "-"]
good_without_config: true
download: terraform
stdin: true
success_codes: [0]
formatter: true
cache_results: true
environment:
- name: PATH
list: ["${linter}"]
known_good_version: 1.1.0
version_command:
parse_regex: ${semver}
run: terraform --version
is_recommended: false
deprecated:
terraform-fmt is now handled by terraform. Please delete terraform-fmt from your config

- name: terraform-validate
files: [terraform]
type: terraform_validate
command: [terraform, validate, -json]
good_without_config: true
run_linter_from: directory
download: terraform
success_codes: [0, 1]
environment:
- name: PATH
list: ["${linter}"]
- name: GITHUB_APP_ID
value: ${env.GITHUB_APP_ID}
optional: true
- name: GITHUB_APP_INSTALLATION_ID
value: ${env.GITHUB_APP_INSTALLATION_ID}
optional: true
- name: GITHUB_APP_PEM_FILE
value: ${env.GITHUB_APP_PEM_FILE}
optional: true
known_good_version: 1.1.0
is_recommended: false
version_command:
parse_regex: ${semver}
run: terraform --version
deprecated:
terraform-validate is now handled by terraform. Please delete terraform-validate from your
config

0 comments on commit 19b7f84

Please sign in to comment.