Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/.markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Canonical ResQ markdownlint config — copy to a repo root as .markdownlint.jsonc.
// Encodes docs/standards/02-languages.md (Markdown).
{
"default": true,
"MD013": false, // line length — prose wraps; not a lint error
"MD033": false, // inline HTML — our READMEs use centered <div>/<img> heroes
"MD041": false, // first line need not be a heading (template opens with an HTML comment/banner)
"MD024": { "siblings_only": true }, // duplicate headings ok across sections
"MD029": { "style": "ordered" }
}
13 changes: 9 additions & 4 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ settings — repos adopt them so "what does conformant look like" has one answer
| [Ruff config](#python-ruff) (below) | Ruff (lint + format) | copy into `ruff.toml` / `pyproject.toml` |
| [`rust/deny.toml`](./rust/deny.toml) | cargo-deny | copy to repo root |
| [`yamllint.yml`](./yamllint.yml) | yamllint | copy as `.yamllint.yml` |
| [`dotnet/Directory.Build.props`](./dotnet/Directory.Build.props) | MSBuild / Roslyn analyzers | drop at repo root (auto-imported) |
| [`sql/.sqlfluff`](./sql/.sqlfluff) | SQLFluff | copy to repo root |
| [`.markdownlint.jsonc`](./.markdownlint.jsonc) | markdownlint | copy to repo root |

See [`docs/standards/02-languages.md`](../docs/standards/02-languages.md) for the
per-language rules these encode, and the [standards index](../docs/standards/)
Expand Down Expand Up @@ -46,8 +49,10 @@ quote-style = "double"
indent-style = "space"
```

## Not yet templated
## Adding a config

C# (`.editorconfig` analyzer rules), SQL (`.sqlfluff`), and Markdown
(`.markdownlint.jsonc`) are documented in the standards but not yet shipped as
canonical files here — add them when the first repo of that kind needs one.
The set now covers every language in the standards (TS, Python, C#, Rust,
Shell-via-`.editorconfig`, SQL, YAML, Markdown). When a tool needs a canonical
config, add the file here, document the rules it encodes in
[`docs/standards/02-languages.md`](../docs/standards/02-languages.md), and list
it in the table above.
22 changes: 22 additions & 0 deletions config/dotnet/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
Canonical ResQ .NET build props. Encodes docs/standards/02-languages.md (C#).
Unlike the copy-only configs, Directory.Build.props is auto-imported by MSBuild
from the repo root — drop it in and every project inherits these. Merge into an
existing Directory.Build.props if one is already present.
-->
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>

<!-- Built-in Roslyn (.NET) analyzers + code-style enforced at build. -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>

<!-- Treat warnings as errors in CI; keep local dev builds loud-but-green. -->
<TreatWarningsAsErrors Condition="'$(CI)' == 'true'">true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Comment on lines +18 to +20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Enabling <GenerateDocumentationFile>true</GenerateDocumentationFile> globally triggers compiler warning CS1591 (Missing XML comment for publicly visible type or member) for all public APIs. Since <TreatWarningsAsErrors> is enabled in CI, this will break the build for any project containing public members without XML comments (which is common in application projects, controllers, etc.).

It is highly recommended to suppress CS1591 globally so that documentation files are still generated (e.g., for Swagger/OpenAPI) without forcing XML comments on every public member.

    <!-- Treat warnings as errors in CI; keep local dev builds loud-but-green. -->
    <TreatWarningsAsErrors Condition="'$(CI)' == 'true'">true</TreatWarningsAsErrors>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
    <NoWarn>$(NoWarn);1591</NoWarn>

</PropertyGroup>
</Project>
16 changes: 16 additions & 0 deletions config/sql/.sqlfluff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Canonical ResQ SQLFluff config — copy to a repo root as .sqlfluff.
# Encodes docs/standards/02-languages.md (SQL). Dialect = Postgres (Supabase).
[sqlfluff]
dialect = postgres
templater = jinja
max_line_length = 100

[sqlfluff:indentation]
indent_unit = space
tab_space_size = 2

[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = lower

[sqlfluff:rules:capitalisation.identifiers]
extended_capitalisation_policy = lower
Comment on lines +12 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In SQLFluff v2.0.0 and later, all rule names and configuration options were renamed from British spelling (capitalisation) to American spelling (capitalization). Using the old spelling will result in configuration warnings or errors in modern SQLFluff versions.

Please update the section headers and configuration keys to use capitalization.

[sqlfluff:rules:capitalization.keywords]
capitalization_policy = lower

[sqlfluff:rules:capitalization.identifiers]
extended_capitalization_policy = lower

Loading