Now that software updates are handled by a bash script that is stored
in the repository these pre-commit hooks should be re-added to the
pre-commit configuration. This also includes re-adding all of the
scaffolding that installs the shfmt tool in the build.yml workflow.
We have had a difficult time with how beautysh parses some shellscripts. I went
in pursuit of an alternative and I believe shfmt to be a good alternative.
Co-authored-by: Shane Frasier <jeremy.frasier@trio.dhs.gov>
This converts the existing `.mdl_config.json` file to an equivalent
`.mdl_config.yaml` file. The reference in the markdownlint pre-commit hook
configuration is updated to match.
Co-authored-by: Shane Frasier <jeremy.frasier@trio.dhs.gov>
Hooks updated with the `pre-commit autoupdate` command.
Note:
The `ansible-lint` hook is intentionally being held back on 4.3.7 because of
ongoing issues with the 5.x version and how we use Ansible (standalone Galaxy
roles).
Enabled 'check-case-conflict' because of our mixed Linux and macOS development.
Although APFS supports case-sensitive containers, it is not the default as far
as I am aware. Linux filesystems are typically case-sensitive however.
With the merge of https://github.com/cisagov/development-guide/pull/42 we now
have a TOML file in a repository, so it does not hurt to add this hook in case
more are added in the future.
At some point the python GitHub organization renamed to psf (Python Software
Foundation). Although it redirects with no issue, I think it should be updated
to reflect the current repository URL.
As of isort >=5, which we use, the seed-isort-config hook has been deprecated,
and the repository archived. I have removed the hook and the configuration
options it updated as a result.
Notable version changes:
- docker-pre-commit v2.0.0
This release includes the addition of two new hooks: hadolint and
hadolint-system. These allow for linting Dockerfiles with the hadolint
Docker image or a system installation of hadolint respectively.
- isort 5.0.7
This release takes us from isort 4 to isort 5. There are a multitude of
changes with information available on the isort 5 release page at
https://timothycrosley.github.io/isort/docs/major_releases/introducing_isort_5/
The most notable feature for us is the addition of built-in profiles for
isort to run under. These profiles provide settings for conforming to various
popular styles, and black is one of the profiles.
Review noticed that there lacked a determination for what we were doing about
the problem with the terraform_validate hook. I described the problems but
failed to mention what our path forward would be. This commit rectifies that
oversight.
We have seen a number of issues related to this hook ever since it was
re-enabled. It will need to remain disabled until at least the 0.13 Terraform
release, and can only be re-enabled if all issues we have seen have been
resolved in how `terraform validate` operates.