Gofmt formats Go programs.
Patterns to include in execution and reports.
Patterns to exclude from execution and reports.
Specifying true implies
Note: As of now, gofmt does not keep CRLF line endings and all EOL characters are converted to LF in files where the auto-fix is applied. We will solve this problem, but for the time being, please don't enable the auto-fix feature if you need to keep CRLF line endings.
Amount of CPU. The default machine has
0.25 CPU with
960 MiB RAM.
Below is the list of options that are supported:
-r rule Apply the rewrite rule to the source before reformatting. -s Try to simplify code (after applying the rewrite rule, if any).
No tool specific severity levels are available.
With default options:
inspecode: gofmt: default
With enabling auto-fixing and default options:
inspecode: gofmt: auto-fix
With custom machine:
inspecode: gofmt: machine: cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
With custom options:
inspecode: gofmt: auto-fix: true options: -s: -r: 'a[b:len(a)] -> a[b:]'