From f6103cf07bee7207ea33618c848d5561eac9f7a3 Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Tue, 10 Sep 2024 14:23:12 +0100 Subject: [PATCH] lsp: templating add docs Signed-off-by: Charlie Egan --- docs/rules/idiomatic/directory-package-mismatch.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/rules/idiomatic/directory-package-mismatch.md b/docs/rules/idiomatic/directory-package-mismatch.md index 4c17d81a..2422c749 100644 --- a/docs/rules/idiomatic/directory-package-mismatch.md +++ b/docs/rules/idiomatic/directory-package-mismatch.md @@ -97,6 +97,13 @@ demonstrates a new policy being created inside an `authorization/rbac/roles` dir src={require('../../assets/rules/pkg_name_completion.png').default} alt="Package path auto-completion in VS Code"/> +In addition, when `regal fix` is enabled as a formatter, empty files will be be +'formatted' to have the correct package based on the directory structure. Newly +created Rego files are treated in much the same way. When a new file is created, +the server will send a series of edits back to set the content. If +`exclude-test-suffix` is set to `false`, the file will also be moved if required +to the `_test` directory for that package. + ## Configuration Options This linter rule provides the following configuration options: