zarf icon indicating copy to clipboard operation
zarf copied to clipboard

Consistent file formatting

Open Noxsios opened this issue 1 year ago • 2 comments

Describe what should be investigated or refactored

Currently there exists a pre-commit hook to run go fmt on changed files.

There exists a .editorconfig, and a .markdownlint.json config files at root, but these are opt-in formatting configs.

For consistency, all files whose consistent formatting we care about should be formatting using a combination of go fmt, prettier, shellcheck, and markdownlint-cli2.

Paths we care about:

  • **/*.md (!docs/2-the-zarf-cli/100-cli-commands/)
  • **/*.go
  • **/*.ya?ml
  • hack/*.sh

? : does prettier handle TOML?

related: should we decide upon yaml vs yml?

related: need to cleanup and re-visit pre-commit hooks, some are deprecated / not maintained anymore

related: should write some small sh script to ensure SPDX header is present on all code files.

Noxsios avatar Feb 18 '24 19:02 Noxsios

A solid baseline may be https://github.com/Azure/aks-periscope/blob/master/.pre-commit-config.yaml

Noxsios avatar Feb 19 '24 05:02 Noxsios

Can def be split into formatting issues / PRs based upon file type

Noxsios avatar Mar 06 '24 19:03 Noxsios