git-gurus-itu-devops / itu-minitwit

0 stars 0 forks source link

Add linting / static analysis tools #55

Closed duckth closed 6 months ago

duckth commented 6 months ago

This pull requests adds various linters / static analyzers to our different tools / languages, and sets up a Lefthook config to run them as pre-push git hooks. Ruby: I've chosen Rubocop over standardRB because it seems like most of us had problems getting it to run, with tools like Solargraph and RubyLSP using Rubocop for diagnostics. So, to spare us the trouble of managing multiple configs and tweaking editor configs, let's just go with Rubocop (even though Standard is faster and has "saner" defaults IMHO). Specifically, I've chosen the Shopify-config for rubocop, since it has some much saner settings than the default rubocop ones. GitHub Actions: Uses actionlint to lint the files when edits are made in .github/* Vagrant: Runs the built in vagrant validate command. Docker: Uses Hadolint.

Also fixes various issues reported by these new linters.

sonarcloud[bot] commented 6 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
7.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud