diff --git a/README.md b/README.md index ad15c0e..a15e16e 100644 --- a/README.md +++ b/README.md @@ -105,15 +105,18 @@ sets: # the default configuration. exclude: - "vendor/**" - - "**/zz_generated.**" - - "**/zz_generated_**" - ".git/**" - - "node_modules/**" - "_build/**" + - "node_modules/**" + - "**/zz_generated.**" + - "**/zz_generated_**" + - "**/generated.pb.go" + - "**/generated.proto" + - "**/*_generated.go" # whether or not to detect generated files by their content, this means # checking if a top-line comment containing `(been generated|generated by|do not edit)` -# exists +# exists _before_ the package declaration detectGeneratedFiles: true # whether or not to remove unused imports; usually this is not needed, @@ -131,14 +134,7 @@ Put the configuration either in a `.gimps.yaml` in the module root (recommended) it explicitly via `-config`. Provide one or more arguments, each being either a file or a directory. Directories are -automatically traversed recursively, except for a few ignored items: - -- `vendor` -- `.git` -- `_build` -- `zz_generated.*` -- `zz_generated_*` -- files that contain `(been generated|generated by|do not edit)` (case insensitive) in their first line +automatically traversed recursively, except for the items noted in the example configuration above. **Important:** The first argument controls the Go module path for the entire operation. It's not recommended to make gimps work across multiple modules at the same time. Usually you want to @@ -148,6 +144,8 @@ editor integration when needed. For the editor integration, you can specify `-stdout` to print the formatted file to stdout. This only makes sense if you provide exactly one file, otherwise separating the output is difficult. +If you just want to see which files would be fixed, run with `-dry-run`. + ```bash $ cd ~/myproject $ gimps .