diff --git a/.gitignore b/.gitignore index 5945032..d054eae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ # OS / editor .DS_Store Thumbs.db -.vs/ -.idea/ +/.vs/ +# Only the repository's own IDE folder; configs/intellij/project/.idea/ is content. +/.idea/ *.swp # Build and tool output diff --git a/configs/README.md b/configs/README.md index 51171a8..7f8ce17 100644 --- a/configs/README.md +++ b/configs/README.md @@ -37,6 +37,7 @@ with exact import steps for the IDE and the command line. | Folder | What | | --- | --- | | [`security/`](security) | gitleaks, Trivy, and zizmor configurations, and how to run each locally | +| [`markdown/`](markdown) | markdownlint-cli2 config: all default rules except line length (none, per K22-CODE-08) | | [`pre-commit/`](pre-commit) | The pre-commit hook set: hygiene, secrets, Conventional Commit messages, DCO sign-off, workflow linting | Files adopted from Kingsrook's QQQ project keep their original copyright and Apache-2.0 diff --git a/configs/intellij/README.md b/configs/intellij/README.md index 4c507bb..8ec103e 100644 --- a/configs/intellij/README.md +++ b/configs/intellij/README.md @@ -8,9 +8,9 @@ Standards: [Java profile](../../standards/coding/java.md), | File | What it is | Origin | | --- | --- | --- | | [`Kingsrook_Code_Style.xml`](Kingsrook_Code_Style.xml) | IDE code-style scheme: Java, JavaScript, TypeScript, JSON, XML, SQL, Shell, CSS, HTML, Groovy, VTL | Kingsrook (Apache-2.0), unmodified | -| `project/.idea/codeStyles/` (not yet published) | The same scheme as a per-project style, committed so the whole team gets it automatically | Derived from the above | -| `project/.idea/checkstyle-idea.xml` (not yet published) | CheckStyle-IDEA plugin settings pointing at the published KofTwentyTwo checkstyle config | KofTwentyTwo | -| `project/.idea/copyright/` (not yet published) + [`KofTwentyTwo_Copyright_Profile.xml`](KofTwentyTwo_Copyright_Profile.xml) | Copyright profile that inserts the KofTwentyTwo SPDX header (K22-CODE-24) | KofTwentyTwo | +| [`project/.idea/codeStyles/`](project/.idea/codeStyles) | The same scheme as a per-project style, committed so the whole team gets it automatically | Derived from the above | +| [`project/.idea/checkstyle-idea.xml`](project/.idea/checkstyle-idea.xml) | CheckStyle-IDEA plugin settings pointing at the published KofTwentyTwo checkstyle config | KofTwentyTwo | +| [`project/.idea/copyright/`](project/.idea/copyright) + [`KofTwentyTwo_Copyright_Profile.xml`](KofTwentyTwo_Copyright_Profile.xml) | Copyright profile that inserts the KofTwentyTwo SPDX header (K22-CODE-24) | KofTwentyTwo | | [`Kingsrook_Copyright_Profile.xml`](Kingsrook_Copyright_Profile.xml) | QQQ's own Apache-2.0 header, for QQQ-derived code only | Kingsrook, unmodified | | [`live-templates/`](live-templates) | Kingsrook Java and SQL live templates (method, getter/setter/fluent setter, JUnit lifecycle, Liquibase changesets) | Kingsrook, unmodified | diff --git a/configs/intellij/project/.idea/checkstyle-idea.xml b/configs/intellij/project/.idea/checkstyle-idea.xml new file mode 100644 index 0000000..3807582 --- /dev/null +++ b/configs/intellij/project/.idea/checkstyle-idea.xml @@ -0,0 +1,20 @@ + + + + + 14.3.0 + JavaOnlyWithTests + + + + diff --git a/configs/intellij/project/.idea/codeStyles/Project.xml b/configs/intellij/project/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..6948729 --- /dev/null +++ b/configs/intellij/project/.idea/codeStyles/Project.xml @@ -0,0 +1,289 @@ + + + + + + diff --git a/configs/intellij/project/.idea/codeStyles/codeStyleConfig.xml b/configs/intellij/project/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..0f7bc51 --- /dev/null +++ b/configs/intellij/project/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + diff --git a/configs/intellij/project/.idea/copyright/KofTwentyTwo.xml b/configs/intellij/project/.idea/copyright/KofTwentyTwo.xml new file mode 100644 index 0000000..af35844 --- /dev/null +++ b/configs/intellij/project/.idea/copyright/KofTwentyTwo.xml @@ -0,0 +1,6 @@ + + + + diff --git a/configs/intellij/project/.idea/copyright/profiles_settings.xml b/configs/intellij/project/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..b5dfadf --- /dev/null +++ b/configs/intellij/project/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + diff --git a/configs/markdown/.markdownlint-cli2.jsonc b/configs/markdown/.markdownlint-cli2.jsonc new file mode 100644 index 0000000..4e89f8a --- /dev/null +++ b/configs/markdown/.markdownlint-cli2.jsonc @@ -0,0 +1,17 @@ +// KofTwentyTwo markdownlint configuration (markdownlint-cli2). Copy to the repository +// root. Defaults stay on except where they contradict the KofTwentyTwo standards. +{ + "config": { + "default": true, + // K22-CODE-08: no line-length limit. Prose wraps where it reads well; tables and + // links never wrap. + "MD013": false, + // Collapsible sections in templates and READMEs. + "MD033": { "allowed_elements": ["details", "summary", "br", "b", "sub", "sup"] }, + // GitHub pull request and issue templates start below the title GitHub renders. + "MD041": false, + // Repeated headings are fine under different parents (e.g. "Why" per section). + "MD024": { "siblings_only": true } + }, + "ignores": ["**/node_modules/**", "LICENSE*"] +} diff --git a/configs/markdown/README.md b/configs/markdown/README.md new file mode 100644 index 0000000..06a114d --- /dev/null +++ b/configs/markdown/README.md @@ -0,0 +1,14 @@ +# Markdown + +[`.markdownlint-cli2.jsonc`](.markdownlint-cli2.jsonc) configures +[markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) for every +repository: all default rules, except no line-length limit (`K22-CODE-08`), a short list +of allowed HTML elements, and repeated headings allowed under different parents. + +- **Command line:** copy the file to the repository root and run + `npx markdownlint-cli2 "**/*.md"`. +- **VS Code:** the *markdownlint* extension (`DavidAnson.vscode-markdownlint`) reads the + same file. +- **JetBrains IDEs:** the built-in Markdown inspections are independent; rely on the + pre-commit hook or CI for markdownlint. +- **CI:** the `docs` job in this repository's `ci.yml` shows how to run it pinned.