{"id":26092862,"url":"https://github.com/dart-archive/linter","last_synced_at":"2025-10-19T11:01:45.918Z","repository":{"id":25770898,"uuid":"29209166","full_name":"dart-archive/linter","owner":"dart-archive","description":"Linter for Dart.","archived":true,"fork":false,"pushed_at":"2024-11-19T21:26:46.000Z","size":8297,"stargazers_count":632,"open_issues_count":0,"forks_count":169,"subscribers_count":56,"default_branch":"main","last_synced_at":"2025-03-05T19:12:40.924Z","etag":null,"topics":["dart","flutter","lint","linter","style-linter"],"latest_commit_sha":null,"homepage":"https://dart.dev/tools/linter-rules","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dart-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-13T20:21:11.000Z","updated_at":"2025-03-04T22:50:49.000Z","dependencies_parsed_at":"2023-02-18T19:46:13.513Z","dependency_job_id":"d93d9874-0997-417f-b461-65796ddd1fb0","html_url":"https://github.com/dart-archive/linter","commit_stats":null,"previous_names":["dart-archive/linter"],"tags_count":177,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-archive%2Flinter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-archive%2Flinter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-archive%2Flinter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-archive%2Flinter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dart-archive","download_url":"https://codeload.github.com/dart-archive/linter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242679507,"owners_count":20168162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","lint","linter","style-linter"],"created_at":"2025-03-09T11:02:06.957Z","updated_at":"2025-10-19T11:01:45.363Z","avatar_url":"https://github.com/dart-archive.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# Linter for Dart\n\n## [Repository has moved][]\n\nThe Dart linter is now developed within the [Dart SDK][] repository,\nand can be found at https://github.com/dart-lang/sdk/tree/main/pkg/linter.\n\nTo contribute changes, check out the [SDK contribution guide][].\n\n[Repository has moved]: https://github.com/dart-lang/sdk/tree/main/pkg/linter\n[Dart SDK]: https://github.com/dart-lang/sdk\n[SDK contribution guide]: https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md\n\n---\n\nThe Dart Linter package defines lint rules that identify and report on \"lints\" found in Dart code.  Linting is performed by the Dart\nanalysis server and the `dart analyze` command in the [Dart command-line tool][dart_cli].\n\n[![Build Status](https://github.com/dart-lang/linter/workflows/linter/badge.svg)](https://github.com/dart-lang/linter/actions)\n[![Coverage Status](https://coveralls.io/repos/dart-lang/linter/badge.svg)](https://coveralls.io/r/dart-lang/linter)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/dart-lang/linter/badge)](https://deps.dev/project/github/dart-lang%2Flinter)\n\n## Installing\n\nThe linter is bundled with the Dart [SDK](https://dart.dev/tools/sdk); if you have an updated Dart SDK already, you're done!\n\nAlternatively, if you want to contribute to the linter or examine the source, clone the `linter` repo like this:\n\n    $ git clone https://github.com/dart-lang/linter.git\n\n## Usage\n\nThe linter gives you feedback to help you catch potential errors and keep your code in line with the published\n[Dart Style Guide][style_guide]. Enforceable lint rules (or \"lints\") are cataloged [here][lints] and can be configured via an\n[analysis options file][options_file].  The linter is run from within the `dart analyze` [command-line tool][analyzer_cli] shipped with the\nDart SDK.  Assuming you have lints configured in an `analysis_options.yaml` file at the root of your project with these contents:\n\n```yaml\nlinter:\n  rules:\n    - annotate_overrides\n    - hash_and_equals\n    - prefer_is_not_empty\n```\nyou could lint your package like this:\n\n    $ dart analyze .\n\nand see any violations of the `annotate_overrides`, `hash_and_equals`, and `prefer_is_not_empty` rules in the console.\nTo help you choose the rules you want to enable for your package, we have provided a [complete list of rules][lints]\nwith lints recommended by the Dart team collected in [`package:lints`][package-dart-lints]. Lints recommended for Flutter apps, packages,\nand plugins are documented in [`package:flutter_lints`][package-flutter-lints].\n\nIf a specific lint warning should be ignored, it can be flagged with a comment.  For example,\n\n```dart\n   // ignore: camel_case_types\n   class whyOhWhy { }\n```\n\ntells the Dart analyzer to ignore this instance of the `camel_case_types` warning.\n\nEnd-of-line comments are supported as well.  The following communicates the same thing:\n\n```dart\n   class whyOhWhy { // ignore: camel_case_types\n```\n\nTo ignore a rule for an entire file, use the `ignore_for_file` comment flag.  For example,\n\n```dart\n// ignore_for_file: camel_case_types\n\n...\n\nclass whyOhWhy { }\n```\n\ntells the Dart analyzer to ignore all occurrences of the `camel_case_types` warning in this file.\n\nAs lints are treated the same as errors and warnings by the analyzer, their severity can similarly be configured in an options file.  For\nexample, an analysis options file that specifies\n\n```yaml\nlinter:\n  rules:\n    - camel_case_types\nanalyzer:\n  errors:\n    camel_case_types: error\n```\n\ntells the analyzer to treat `camel_case_types` lints as errors.  For more on configuring analysis see the analysis option file [docs][options_file].\n\n## Contributing\n\nFeedback is greatly appreciated and contributions are welcome! Please read the\n[contribution guidelines](CONTRIBUTING.md); mechanics of writing lints are covered [here](doc/writing-lints.md).\n\n## Features and bugs\n\nPlease file feature requests and bugs in the [issue tracker][tracker].\n\n[analyzer_cli]: https://dart.dev/tools/dart-analyze\n[dart_cli]: https://dart.dev/tools/dart-tool\n[effective_dart]: https://dart.dev/effective-dart\n[lints]: https://dart.dev/lints\n[options_file]: https://dart.dev/guides/language/analysis-options#the-analysis-options-file\n[package-dart-lints]: https://github.com/dart-lang/lints\n[package-flutter-lints]: https://github.com/flutter/packages/tree/main/packages/flutter_lints\n[style_guide]: https://dart.dev/effective-dart/style\n[tracker]: https://github.com/dart-lang/linter/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-archive%2Flinter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdart-archive%2Flinter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-archive%2Flinter/lists"}