Skip to content

Commit

Permalink
Remove no-longer-useful linters, scripts etc.
Browse files Browse the repository at this point in the history
Keep the terraform fmt check (still helps fight entropy) and the YAML
lint (not sure it's doing much any more but it's fast and self-contained
so no reason to delete it).

Ditch the Ruby stuff because it's no longer checking anything important
and it generates maintenance overhead with all the dependency updates.

Especially ditch the terraform-docs check - it's of negative value at
this point.
  • Loading branch information
sengi committed Feb 2, 2024
1 parent d1d7ebf commit 819dbe1
Show file tree
Hide file tree
Showing 18 changed files with 2 additions and 925 deletions.
49 changes: 2 additions & 47 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,6 @@ on:
pull_request:

jobs:
check-docs:
name: Docs up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: terraform-docs
env:
TERRAFORM_DOCS_VERSION: '0.16.0'
run: |
echo "Downloading terraform-docs-v${TERRAFORM_DOCS_VERSION} binary."
curl -Lsf \
"https://github.com/terraform-docs/terraform-docs/releases/download/v${TERRAFORM_DOCS_VERSION}/terraform-docs-v${TERRAFORM_DOCS_VERSION}-linux-amd64.tar.gz" | tar -zxf - terraform-docs
echo "Checking whether auto-generated README files are up to date."
PATH="$PATH:$PWD" tools/update-docs.sh
if ! git diff --exit-code; then
echo "The documentation isn't up to date. Run tools/update-docs.sh and commit the results."
exit 1
fi
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
Expand All @@ -61,6 +38,8 @@ jobs:
with:
path: ~/tfenv
key: tfenv-${{ runner.os }}
- name: Validate JSON
run: find . -type -f -name '*.json' | xargs tools/json-check.sh
- name: terraform install
env:
TFENV_VERSION: '3.0.0'
Expand Down Expand Up @@ -89,27 +68,3 @@ jobs:
echo "Run terraform fmt -recursive . to fix formatting."
exit 1
fi
other-linters:
name: Other linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: ruby/setup-ruby@v1
- uses: actions/cache@v3
with:
path: vendor/bundle
key: bundle-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: bundle
- name: bundle install
run: bundle install -j8 --deployment --without development
- name: RSpec
run: bundle exec rspec spec/validate_resources_spec.rb
- name: Lint resource names
run: bundle exec lib/resource_name_lint.rb
- name: Validate JSON
run: find . -type -f -name '*.json' | xargs tools/json-check.sh
- name: Check ADRs
run: tools/adr-check.sh
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

8 changes: 0 additions & 8 deletions Gemfile

This file was deleted.

31 changes: 0 additions & 31 deletions Gemfile.lock

This file was deleted.

77 changes: 0 additions & 77 deletions jenkins.sh

This file was deleted.

23 changes: 0 additions & 23 deletions lib/resource_name_lint.rb

This file was deleted.

64 changes: 0 additions & 64 deletions lib/validate_resources.rb

This file was deleted.

4 changes: 0 additions & 4 deletions lint.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions spec/aws_security_group_rule.tf

This file was deleted.

8 changes: 0 additions & 8 deletions spec/spec_helper.rb

This file was deleted.

18 changes: 0 additions & 18 deletions spec/validate_resources_spec.rb

This file was deleted.

9 changes: 0 additions & 9 deletions tools/adr-check.sh

This file was deleted.

Loading

0 comments on commit 819dbe1

Please sign in to comment.