Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 2984e3b

Browse files
authored
docs: rename to DCM and update website links (#1155)
* docs: rename package name * docs: update links to poing to new website * docs: add label about new website * test: update test * chore: fix typo
1 parent aa8bc9b commit 2984e3b

File tree

19 files changed

+214
-217
lines changed

19 files changed

+214
-217
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Bug report
3-
about: Report an issue with Dart code metrics.
3+
about: Report an issue with DCM.
44
title: "[BUG] "
55
labels: bug
66
assignees: dkrutskikh, incendial
@@ -10,7 +10,7 @@ assignees: dkrutskikh, incendial
1010
This template is for bug reports. If you want to to ask a question, improve existing rule or suggest a new one please use another template.
1111
-->
1212

13-
* **Dart code metrics version:**
13+
* **DCM version:**
1414
* **Dart sdk version:**
1515

1616
**Please show your full configuration:**

.github/workflows/package_analyze.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Analyze project
6565
run: dart analyze --fatal-warnings --fatal-infos .
6666

67-
- name: Analyze by Dart Code Metrics
67+
- name: Analyze by DCM
6868
uses: dart-code-checker/[email protected]
6969
with:
7070
github_token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 159 additions & 159 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88

99
<img
1010
src="https://raw.githubusercontent.com/dart-code-checker/dart-code-metrics/master/assets/logo.svg"
11-
alt="Dart Code Metrics logo"
11+
alt="DCM logo"
1212
height="150" width="150"
1313
align="right">
1414

15-
# Dart Code Metrics
15+
# DCM
1616

17-
**Note: you can find [the full documentation on the website](https://dartcodemetrics.dev/docs/getting-started/introduction)**
17+
**Note: you can find [the full documentation on the website](https://dcm.dev/individuals/docs/getting-started)**
1818

19-
[Configuration](https://dartcodemetrics.dev/docs/getting-started/configuration) |
20-
[Rules](https://dartcodemetrics.dev/docs/rules) |
21-
[Metrics](https://dartcodemetrics.dev/docs/metrics) |
22-
[Anti-patterns](https://dartcodemetrics.dev/docs/anti-patterns/overivew)
19+
[Configuration](https://dcm.dev/docs/individuals/configuration) |
20+
[Rules](https://dcm.dev/docs/individuals/rules) |
21+
[Metrics](https://dcm.dev/docs/individuals/metrics) |
22+
[Anti-patterns](https://dcm.dev/docs/individuals/anti-patterns/overivew)
2323

2424
<a href="https://flutter.dev/docs/development/packages-and-plugins/favorites">
2525
<img
@@ -29,15 +29,15 @@
2929
align="right">
3030
</a>
3131

32-
Dart Code Metrics is a static analysis tool that helps you analyse and improve your code quality.
32+
DCM is a static analysis tool that helps you analyse and improve your code quality.
3333

34-
- Reports [code metrics](https://dartcodemetrics.dev/docs/metrics)
35-
- Provides [additional rules](https://dartcodemetrics.dev/docs/rules) for the dart analyzer
36-
- Checks for [anti-patterns](https://dartcodemetrics.dev/docs/anti-patterns)
37-
- Checks [unused `*.dart` files](https://dartcodemetrics.dev/docs/cli/check-unused-files)
38-
- Checks [unused l10n](https://dartcodemetrics.dev/docs/cli/check-unused-l10n)
39-
- Checks [unnecessary nullable parameters](https://dartcodemetrics.dev/docs/cli/check-unnecessary-nullable)
40-
- Can be used as [CLI](https://dartcodemetrics.dev/docs/cli), [analyzer plugin](https://dartcodemetrics.dev/docs/analyzer-plugin) or [library](https://dartcodemetrics.dev/docs/getting-started/installation#library)
34+
- Reports [code metrics](https://dcm.dev/docs/individuals/metrics)
35+
- Provides [additional rules](https://dcm.dev/individuals/docs/rules) for the dart analyzer
36+
- Checks for [anti-patterns](https://dcm.dev/docs/individuals/anti-patterns)
37+
- Checks [unused `*.dart` files](https://dcm.dev/docs/individuals/cli/check-unused-files)
38+
- Checks [unused l10n](https://dcm.dev/docs/individuals/cli/check-unused-l10n)
39+
- Checks [unnecessary nullable parameters](https://dcm.dev/docs/individuals/cli/check-unnecessary-nullable)
40+
- Can be used as [CLI](https://dcm.dev/docs/individuals/cli), [analyzer plugin](https://dcm.dev/docs/individuals/analyzer-plugin) or [library](https://dcm.dev/docs/individuals/getting-started/#library)
4141

4242
## Links
4343

@@ -99,13 +99,13 @@ dart_code_metrics:
9999
100100
Reload IDE to allow the analyzer to discover the plugin config.
101101
102-
You can read more about the configuration [on the website](https://dartcodemetrics.dev/docs/getting-started/configuration).
102+
You can read more about the configuration [on the website](https://dcm.dev/docs/individuals/configuration).
103103
104104
## Usage
105105
106106
### Analyzer plugin
107107
108-
Dart Code Metrics can be used as a plugin for the Dart `analyzer` [package](https://pub.dev/packages/analyzer) providing additional rules. All issues produced by rules or anti-patterns will be highlighted in IDE.
108+
DCM can be used as a plugin for the Dart `analyzer` [package](https://pub.dev/packages/analyzer) providing additional rules. All issues produced by rules or anti-patterns will be highlighted in IDE.
109109

110110
![Highlighted issue example](https://raw.githubusercontent.com/dart-code-checker/dart-code-metrics/master/assets/plugin-example.png)
111111

@@ -127,7 +127,7 @@ The package can be used as CLI and supports multiple commands:
127127

128128
For additional help on any of the commands, enter `dart run dart_code_metrics:metrics help <command>`
129129

130-
**Note:** if you're setting up Dart Code Metrics for multi-package repository, check out [this website section](https://dartcodemetrics.dev/docs/cli#multi-package-repositories-usage).
130+
**Note:** if you're setting up DCM for multi-package repository, check out [this website section](https://dcm.dev/docs/individuals/cli#multi-package-repositories-usage).
131131

132132
#### Analyze
133133

@@ -261,16 +261,16 @@ If you are interested in contributing, please check out the [contribution guidel
261261

262262
### En
263263

264-
- [Finding Unused Files With Dart Code Metrics](https://medium.com/wriketechclub/finding-unused-files-with-dart-code-metrics-b9aba48ad7ca) - This article considers one of the first commands, checking unused Dart files, by [Dmitry Zhifarsky](https://github.com/incendial)
265-
- [Improving Code Quality With Dart Code Metrics](https://medium.com/wriketechclub/improving-code-quality-with-dart-code-metrics-430a5e3e316d) - Advantages of using Dart Code Metrics, by [Dmitry Zhifarsky](https://github.com/incendial)
264+
- [Finding Unused Files With DCM](https://medium.com/wriketechclub/finding-unused-files-with-dart-code-metrics-b9aba48ad7ca) - This article considers one of the first commands, checking unused Dart files, by [Dmitry Zhifarsky](https://github.com/incendial)
265+
- [Improving Code Quality With DCM](https://medium.com/wriketechclub/improving-code-quality-with-dart-code-metrics-430a5e3e316d) - Advantages of using DCM, by [Dmitry Zhifarsky](https://github.com/incendial)
266266
- [Creating a Custom Plugin for Dart Analyzer](https://medium.com/wriketechclub/creating-a-custom-plugin-for-dart-analyzer-48b76d81a239) - How to develop a custom Dart code analyzer plugin, by [Dmitry Zhifarsky](https://github.com/incendial)
267-
- [Flutter Static Analysis, Dart Code Metrics](https://fredgrott.medium.com/flutter-static-analysis-dart-code-metrics-c9ec484f4e0f) - How to install the dart_code-metrics plugin and effectively use it to analyze dart code, by [Fred Grott](https://github.com/fredgrott)
267+
- [Flutter Static Analysis, DCM](https://fredgrott.medium.com/flutter-static-analysis-dart-code-metrics-c9ec484f4e0f) - How to install the dart_code-metrics plugin and effectively use it to analyze dart code, by [Fred Grott](https://github.com/fredgrott)
268268

269269
### Ru
270270

271-
- [Повышаем качество кода с Dart Code Metrics](https://habr.com/ru/company/wrike/blog/552012/) - Преимущества использования Dart Code Metrics, от [Dmitry Zhifarsky](https://github.com/incendial)
271+
- [Повышаем качество кода с DCM](https://habr.com/ru/company/wrike/blog/552012/) - Преимущества использования DCM, от [Dmitry Zhifarsky](https://github.com/incendial)
272272
- [Как создать кастомный плагин для Dart-анализатора](https://habr.com/ru/company/wrike/blog/541672/) - Описан процесс создания плагина для анализатора кода, от [Dmitry Zhifarsky](https://github.com/incendial)
273-
- [Dart Code Metrics — мой первый pull request](https://habr.com/ru/post/592131/) - Инструкция по созданию нового правила, от [Vlad Konoshenko](https://github.com/Konoshenko)
273+
- [DCM — мой первый pull request](https://habr.com/ru/post/592131/) - Инструкция по созданию нового правила, от [Vlad Konoshenko](https://github.com/Konoshenko)
274274

275275
## How to reach us
276276

example/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
# Examples
22

3-
Dart Code Metrics is a static analysis tool and code from it is not expected to be used directly. Instead, it should be added as a dev dependency and installed [as described here](https://dartcodemetrics.dev/docs/getting-started/installation).
3+
DCM is a static analysis tool and code from it is not expected to be used directly. Instead, it should be added as a dev dependency and installed [as described here](https://dcm.dev/docs/individuals/getting-started).
44

55
## Plugin and CLI
66

7-
To use Dart Code Metrics as a plugin or a CLI, check out [this repository](https://github.com/dart-code-checker/dart-code-metrics-example) with the example Flutter app. It covers DCM setup and shows all commands output.
7+
To use DCM as a plugin or a CLI, check out [this repository](https://github.com/dart-code-checker/dart-code-metrics-example) with the example Flutter app. It covers DCM setup and shows all commands output.
88

99
## As a library
1010

11-
Dart Code Metrics can be used as a library, imported and called directly from your code. Continue with [this example](https://github.com/dart-code-checker/dart-code-metrics/blob/master/example/lib/main.dart) in order to get more details.
11+
DCM can be used as a library, imported and called directly from your code. Continue with [this example](https://github.com/dart-code-checker/dart-code-metrics/blob/master/example/lib/main.dart) in order to get more details.
1212

1313
## Presets
1414

15-
Dart Code Metrics supports presets:
16-
17-
- all Dart rules [dart_all.yaml](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/presets/dart_all.yaml)
18-
- all Flutter rules [flutter_all.yaml](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/presets/flutter_all.yaml)
19-
- all rules [all.yaml](https://github.com/dart-code-checker/dart-code-metrics/blob/master/lib/presets/all.yaml)
20-
21-
Presets can be enabled with `extends` config, more details [can be found here](https://dartcodemetrics.dev/docs/getting-started/configuration#extending-an-existing-configuration-preset).
15+
Presets can be enabled with `extends` config, more details [can be found here](https://dcm.dev/docs/individuals/configuration/presets/).

lib/src/analyzer_plugin/analyzer_plugin.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AnalyzerPlugin extends ServerPlugin {
3232
List<String> get fileGlobsToAnalyze => const ['*.dart', '*.yaml'];
3333

3434
@override
35-
String get name => 'Dart Code Metrics $packageVersion';
35+
String get name => 'DCM $packageVersion';
3636

3737
@override
3838
String get version => '1.0.0-alpha.0';

lib/src/analyzers/lint_analyzer/anti_patterns/pattern_utils.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ Issue createIssue({
2323
/// Returns a url of a page containing documentation associated with [pattern]
2424
Uri documentation(Pattern pattern) => Uri(
2525
scheme: 'https',
26-
host: 'dartcodemetrics.dev',
26+
host: 'dcm.dev',
2727
pathSegments: [
2828
'docs',
29+
'individuals',
2930
'anti-patterns',
3031
pattern.id,
3132
],

lib/src/analyzers/lint_analyzer/lint_analysis_options_validator.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class LintAnalysisOptionsValidator {
118118
severity: Severity.warning,
119119
message:
120120
"'${rule.ruleName}' is not recognized as a valid rule name.",
121-
documentation: Uri.parse('https://dartcodemetrics.dev/docs/rules'),
121+
documentation: Uri.parse('https://dcm.dev/docs/individuals/rules'),
122122
location: _copySpanWithOffset(rule.span),
123123
),
124124
);
@@ -132,7 +132,7 @@ class LintAnalysisOptionsValidator {
132132
severity: Severity.warning,
133133
message:
134134
"'${rule.ruleName}' requires a config to produce any diagnostics.",
135-
documentation: Uri.parse('https://dartcodemetrics.dev/docs/rules'),
135+
documentation: Uri.parse('https://dcm.dev/docs/individuals/rules'),
136136
location: _copySpanWithOffset(rule.span),
137137
),
138138
);

lib/src/analyzers/lint_analyzer/metrics/metric_utils.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import 'models/metric_value_level.dart';
33
/// Returns the url of a page containing documentation associated with [metricId]
44
Uri documentation(String metricId) => Uri(
55
scheme: 'https',
6-
host: 'dartcodemetrics.dev',
6+
host: 'dcm.dev',
77
pathSegments: [
88
'docs',
9+
'individuals',
910
'metrics',
1011
metricId,
1112
],

lib/src/analyzers/lint_analyzer/rules/rule_utils.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ Issue createIssue({
2727
/// Returns a url of a page containing documentation associated with [rule]
2828
Uri documentation(Rule rule) => Uri(
2929
scheme: 'https',
30-
host: 'dartcodemetrics.dev',
30+
host: 'dcm.dev',
3131
pathSegments: [
3232
'docs',
33+
'individuals',
3334
'rules',
3435
rule.type.value,
3536
rule.id,

lib/src/cli/cli_runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class CliRunner extends CommandRunner<void> {
4848
final showVersion = results[FlagNames.version] as bool;
4949

5050
if (showVersion) {
51-
_logger.info('Dart Code Metrics version: $packageVersion');
51+
_logger.info('DCM version: $packageVersion');
5252

5353
return;
5454
}

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: dart_code_metrics
22
version: 5.4.0
33
description: Software analytics tool that helps developers analyse and improve software quality.
4-
homepage: https://dartcodemetrics.dev
4+
homepage: https://dcm.dev
55
repository: https://github.com/dart-code-checker/dart-code-metrics
66
issue_tracker: https://github.com/dart-code-checker/dart-code-metrics/issues
7-
documentation: https://dartcodemetrics.dev/docs/getting-started/introduction
7+
documentation: https://dcm.dev/docs/individuals/getting-started/introduction
88

99
environment:
1010
sdk: ">=2.18.0 <3.0.0"

test/src/analyzers/lint_analyzer/anti_patterns/pattern_utils_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void main() {
1717
() {
1818
const id = 'pattern-id';
1919
final documentationUrl = Uri.parse(
20-
'https://dartcodemetrics.dev/docs/anti-patterns/pattern-id',
20+
'https://dcm.dev/docs/individuals/anti-patterns/pattern-id',
2121
);
2222
const severity = Severity.none;
2323

@@ -65,7 +65,7 @@ void main() {
6565
expect(
6666
documentation(pattern1).toString(),
6767
equals(
68-
'https://dartcodemetrics.dev/docs/anti-patterns/$patternId1',
68+
'https://dcm.dev/docs/individuals/anti-patterns/$patternId1',
6969
),
7070
);
7171
expect(

test/src/analyzers/lint_analyzer/metrics/metric_utils_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() {
1313
expect(
1414
documentation(metricId1).toString(),
1515
equals(
16-
'https://dartcodemetrics.dev/docs/metrics/metric-id-1',
16+
'https://dcm.dev/docs/individuals/metrics/metric-id-1',
1717
),
1818
);
1919
expect(

0 commit comments

Comments
 (0)