agentleFS
realmrealm/SwiftLint/.github/copilot-instructions.md

SwiftLint

Copilot instructions20k starsChanged 2 years agoMITView on GitHub

You are working on SwiftLint, a linter for Swift code that enforces coding style and conventions. It helps maintain a clean and consistent codebase by identifying and reporting issues in Swift files. It can even automatically fix some of these issues. Linting rules are defined in Source/SwiftLintBuiltInRules/Rules. If someone mentions a rule by its identifier that is in "snakecase" (e.g., rulename), you can usually find the rule's implementation file named "UpperCamelCaseRule.swift" (e.g., <RuleName>Rule.swift) in one of the sub-folders depending on…

We split this copilot-instructions.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All changes need to pass swift test as well as running SwiftLint on itself.

    line 13

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

You are working on SwiftLint, a linter for Swift code that enforces coding style and conventions. It helps maintain a clean and consistent codebase by identifying and reporting issues in Swift files. It can even automatically fix some of these issues.

Linting rules are defined in Source/SwiftLintBuiltInRules/Rules. If someone mentions a rule by its identifier that is in "snake_case" (e.g., rule_name), you can usually find the rule's implementation file named "UpperCamelCaseRule.swift" (e.g., <RuleName>Rule.swift) in one of the sub-folders depending on the rule's kind. Specific configurations for rules are located in the RuleConfigurations folder, which contains files named as <RuleName>Configuration.swift (e.g., IdentifierNameConfiguration.swift).

User-facing changes must be documented in the CHANGELOG.md file, which is organized by version. New entries always go into the "Main" section. They give credit to the person who has made the change and they reference the issue which has been fixed by the change.

All changes on configuration options must be reflected in Tests/IntegrationTests/Resources/default_rule_configurations.yml. This can be achieved by running swift run swiftlint-dev rules register. Running this command is also necessary when new rules got added or removed to (un-)register them from/in the list of built-in rules and tests verifying all examples in rule descriptions.

For some rules, there are dedicated tests in Tests/BuiltInRulesTests. However, they are typically not required as all the examples in the rule descriptions are automatically tested. The examples in the rule descriptions are also used to generate documentation for the rules. If an example presents a very pathological case, that's helpful for testing but not for user documentation, you can add the excludeFromDocumentation: true parameter to the example initializer. Important is that all examples in the rule description are verified by running <RuleName>RuleGeneratedTests for rule modified rules.

The functionality of configurations does not need to be tested explicitly either. But all options should be verified in the provided examples with the configuration: parameter as well.

All changes need to pass swift test as well as running SwiftLint on itself. The command swift run swiftlint run in the root directory of the project does that.

Download now (ZIP)

Trending

Quiet since August.about the whole repository

Dec 2025: 0 mentionsJan 2026: 2 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 2 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the realm/SwiftLint repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about realm/SwiftLint

The biggest 5 of 84 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 84

Talked about on GitHub, Stack Overflow, Hacker News, the web and Bluesky (84 times).

On GitHub · 45

40 more on GitHub

On Stack Overflow · 28

23 more on Stack Overflow

On the web · 4

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.