Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

* chore: deprecate documentation in Github repo.

## 4.5.0-dev.1

* chore: changed min `SDK` version to `2.14.0`.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Build Status](https://shields.io/github/workflow/status/dart-code-checker/dart-code-metrics/build?logo=github&logoColor=white)](https://github.com/dart-code-checker/dart-code-metrics/)
[![Coverage Status](https://img.shields.io/codecov/c/github/dart-code-checker/dart-code-metrics?logo=codecov&logoColor=white)](https://codecov.io/gh/dart-code-checker/dart-code-metrics/)
[![Pub Version](https://img.shields.io/pub/v/dart_code_metrics?logo=dart&logoColor=white)](https://pub.dev/packages/dart_code_metrics/)
[![Pub Version](https://img.shields.io/pub/v/dart_code_metrics?include_prereleases&logo=dart&logoColor=white)](https://pub.dev/packages/dart_code_metrics/versions#prerelease)
[![Dart SDK Version](https://badgen.net/pub/sdk-version/dart_code_metrics)](https://pub.dev/packages/dart_code_metrics/)
[![License](https://img.shields.io/github/license/dart-code-checker/dart-code-metrics)](https://github.com/dart-code-checker/dart-code-metrics/blob/master/LICENSE)
[![Pub popularity](https://badgen.net/pub/popularity/dart_code_metrics)](https://pub.dev/packages/dart_code_metrics/score)
Expand Down
2 changes: 2 additions & 0 deletions doc/anti-patterns/long-method.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Long Method

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/anti-patterns/long-method).

Long blocks of code are difficult to reuse and understand because they are usually responsible for more than one thing. Separating those to several short ones with proper names helps you reuse your code and understand it better without reading methods body.

Lines of code with clarification comments are usually a sign for possible method extraction because you can name extracted method in a way that will cover the comment description and then remove the comment. Even comments for one line is a sign for method extraction.
Expand Down
2 changes: 2 additions & 0 deletions doc/anti-patterns/long-parameter-list.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Long Parameter List

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/anti-patterns/long-parameter-list).

Long parameter lists are difficult to understand and use. Wrapping them into an object allows grouping parameters and change transferred data only by the object modification. When you're working with objects, you should pass just enough so that the method can get the data it needs.

* Use **Replace Parameter with Method** when you can obtain data by calling a method of an object.
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/cyclomatic-complexity.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cyclomatic Complexity

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/cyclomatic-complexity).

Number of linearly independent paths through a block of code. Conditional operators or loops increases the number of paths in a code. The more paths, the higher the number of test cases that need to be implemented. The metric complies with McCabe's original definition:

* Methods have a base complexity of 1.
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/lines-of-code.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Lines of Code

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/lines-of-code).

The lines of code are the total number of lines in a method (or _function_). The comment lines, and the blank lines are also counted. A longer method is often difficult to maintain, tend to do a lot of things and can make it hard following what's going on.

## Config example
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/maximum-nesting-level.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Maximum Nesting

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/maximum-nesting-level).

**Maximum Nesting Level** this is the maximum level of nesting blocks / control structures that are present in a method (or _function_). Code with deep nesting level are often complex and tough to maintain.

Generally the blocks with `if`, `else`, `else if`, `do`, `while`, `for`, `switch`, `catch`, etc statements are the part of nested loops.
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/number-of-methods.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Number of Methods

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/number-of-methods).

The number of methods is the total number of methods in a class (or _mixin_, or _extension_). Too many methods indicate a high complexity.

## Config example
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/number-of-parameters.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Number of Parameters

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/number-of-parameters).

The number of parameters is the number of parameters received by a method (or _function_). If a method receive too many parameters, it is difficult to call and also difficult to change if it's called from many places.

## Config example
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/source-lines-of-code.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Source lines of Code

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/source-lines-of-code).

**Source lines of Code** is an approximate number of source code lines in a function or method. Blank or comment lines are not counted.

This metric is used to measure the size of a computer program by counting the number of lines in the text of the program's source code. **SLOC** is typically used to predict the amount of effort that will be required to develop a program, as well as to estimate programming productivity or maintainability once the software is produced.
Expand Down
2 changes: 2 additions & 0 deletions doc/metrics/weight-of-class.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Weight Of a Class

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/metrics/weight-of-class).

Number of **functional** public methods divided by the total number of public methods.

This metric tries to quantify whether the measured class (or _mixin_, or _extension_) interface reveals more data than behavior. Low values indicate that the class reveals much more data than behavior, which is a sign of poor encapsulation.
Expand Down
2 changes: 2 additions & 0 deletions doc/reporters/github-reporter.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GitHub reporter

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/cli/analyze#github).

Reports about design and static code diagnostics issues in pull requests based on GitHub Actions Workflow commands.

* Install dart/flutter and get packages:
Expand Down
2 changes: 2 additions & 0 deletions doc/reporters/json.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# JSON reporter

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/cli/analyze#json).

Dart Code Metrics can generate a report in JSON format. Use `--reporter=json` to enable this format. The reporter prints a single JSON object containing meta information and the violations grouped by a file. A sample command to analyze a package:

```sh
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/always-remove-listener.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Always remove listener

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/always-remove-listener).

## Rule id

always-remove-listener
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-ignoring-return-values.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid ignoring return values

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/avoid-ignoring-return-values).

## Rule id

avoid-ignoring-return-values
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-late-keyword.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid late keyword

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/avoid-late-keyword).

## Rule id

avoid-late-keyword
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-non-null-assertion.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid non null assertion

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/avoid-non-null-assertion).

## Rule id

avoid-non-null-assertion
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-preserve-whitespace-false.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid preserveWhitespace: false

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/angular/avoid-preserve-whitespace-false).

## Rule id

avoid-preserve-whitespace-false
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-returning-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/avoid-returning-widgets).

## Rule id

avoid-returning-widgets
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-unnecessary-setstate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid unnecessary setState

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/avoid-unnecessary-setstate).

## Rule id

avoid-unnecessary-setstate
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-unused-parameters.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid unused parameters

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/avoid-unused-parameters).

## Rule id

avoid-unused-parameters
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/avoid-wrapping-in-padding.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid wrapping in padding

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/avoid-wrapping-in-padding).

## Rule id

avoid-wrapping-in-padding
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/binary-expression-operand-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Has auto-fix](https://img.shields.io/badge/-has%20auto--fix-success)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/binary-expression-operand-order).

## Rule id

binary-expression-operand-order
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/component-annotation-arguments-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/angular/component-annotation-arguments-ordering).

## Rule id

component-annotation-arguments-ordering
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/double-literal-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Has auto-fix](https://img.shields.io/badge/-has%20auto--fix-success)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/double-literal-format).

## Rule id

double-literal-format
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/member-ordering-extended.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/member-ordering-extended).

## Rule id

member-ordering-extended
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/member-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/member-ordering).

## Rule id

member-ordering
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/newline-before-return.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# New line before return

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/newline-before-return).

## Rule id

newline-before-return
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/no-boolean-literal-compare.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Has auto-fix](https://img.shields.io/badge/-has%20auto--fix-success)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/no-boolean-literal-compare).

## Rule id

no-boolean-literal-compare
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/no-empty-block.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# No empty block

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/no-empty-block).

## Rule id

no-empty-block
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/no-equal-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/no-equal-arguments).

## Rule id

no-equal-arguments
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/no-equal-then-else.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# No equal then else

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/no-equal-then-else).

## Rule id

no-equal-then-else
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/no-magic-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/no-magic-number).

## Rule id

no-magic-number
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/no-object-declaration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# No object declaration

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/no-object-declaration).

## Rule id

no-object-declaration
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-conditional-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Has auto-fix](https://img.shields.io/badge/-has%20auto--fix-success)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/prefer-conditional-expressions).

## Rule id

prefer-conditional-expressions
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-const-border-radius.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Prefer const border radius

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/prefer-const-border-radius).

## Rule id

prefer-const-border-radius
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-extracting-callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/prefer-extracting-callbacks).

## Rule id

prefer-extracting-callbacks
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-intl-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Has auto-fix](https://img.shields.io/badge/-has%20auto--fix-success)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/intl/prefer-intl-name).

## Rule id

prefer-intl-name
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-match-file-name.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Prefer match file name

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/prefer-match-file-name).

## Rule id

prefer-match-file-name
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-on-push-cd-strategy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Prefer using onPush change detection strategy

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/angular/prefer-on-push-cd-strategy).

## Rule id

prefer-on-push-cd-strategy
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-single-widget-per-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

![Configurable](https://img.shields.io/badge/-configurable-informational)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/flutter/prefer-single-widget-per-file).

## Rule id

prefer-single-widget-per-file
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/prefer-trailing-comma.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
![Configurable](https://img.shields.io/badge/-configurable-informational)
![Has auto-fix](https://img.shields.io/badge/-has%20auto--fix-success)

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/common/prefer-trailing-comma).

## Rule id

prefer-trailing-comma
Expand Down
2 changes: 2 additions & 0 deletions doc/rules/provide-correct-intl-args.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Provide correct intl args

> **DEPRECATED!** Information on this page is out of date. You can find the up to date version on our [official site](https://dartcodemetrics.dev/docs/rules/intl/provide-correct-intl-args).

## Rule id

provide-correct-intl-args
Expand Down