diff --git a/docs/tools/flow-cli/accounts/_category_.json b/docs/tools/flow-cli/accounts/_category_.json index c1c0d37afc..78010a8bbd 100644 --- a/docs/tools/flow-cli/accounts/_category_.json +++ b/docs/tools/flow-cli/accounts/_category_.json @@ -1,4 +1,4 @@ { "label": "Accounts", - "position": 4 + "position": 3 } \ No newline at end of file diff --git a/docs/tools/flow-cli/boilerplate.md b/docs/tools/flow-cli/boilerplate.md index 2e89ee5e07..1073d8200a 100644 --- a/docs/tools/flow-cli/boilerplate.md +++ b/docs/tools/flow-cli/boilerplate.md @@ -2,7 +2,7 @@ title: Cadence Boilerplate Generation sidebar_label: Cadence Boilerplate description: Cadence Boilerplate Generation via the CLI -sidebar_position: 13 +sidebar_position: 16 --- ## Introduction diff --git a/docs/tools/flow-cli/data-collection.md b/docs/tools/flow-cli/data-collection.md index 0aafebde78..975f71cf77 100644 --- a/docs/tools/flow-cli/data-collection.md +++ b/docs/tools/flow-cli/data-collection.md @@ -1,7 +1,7 @@ --- title: Data Collection description: Data collected from Flow CLI usage -sidebar_position: 14 +sidebar_position: 17 --- Flow CLI tracks flow command usage count using Mixpanel. diff --git a/docs/tools/flow-cli/flix.md b/docs/tools/flow-cli/flix.md index 8c8044e0e0..a2f9b518ad 100644 --- a/docs/tools/flow-cli/flix.md +++ b/docs/tools/flow-cli/flix.md @@ -2,7 +2,7 @@ title: Flow Interaction Templates (FLIX) sidebar_label: Flow Interaction Templates (FLIX) description: Flow Interaction Templates (FLIX) via the CLI -sidebar_position: 12 +sidebar_position: 15 --- FLIX helps developers reuse existing Cadence transactions and scripts to easily integrate with existing Cadence smart contracts. Get more information about [Flow Interaction Templates](../../build/advanced-concepts/flix.md) diff --git a/docs/tools/flow-cli/flow.json/_category_.json b/docs/tools/flow-cli/flow.json/_category_.json index 46e4c70a07..bf581061c1 100644 --- a/docs/tools/flow-cli/flow.json/_category_.json +++ b/docs/tools/flow-cli/flow.json/_category_.json @@ -1,4 +1,4 @@ { "label": "Flow.json", - "position": 9 + "position": 8 } \ No newline at end of file diff --git a/docs/tools/flow-cli/flow_cli_cheatsheet.md b/docs/tools/flow-cli/flow_cli_cheatsheet.md index b00ce1d779..18c16125a2 100644 --- a/docs/tools/flow-cli/flow_cli_cheatsheet.md +++ b/docs/tools/flow-cli/flow_cli_cheatsheet.md @@ -2,7 +2,7 @@ title: Flow CLI Cheat sheet sidebar_label: Flow CLI Cheatsheet description: Flow CLI All Help Aggregation -sidebar_position: 15 +sidebar_position: 18 --- ``` diff --git a/docs/tools/flow-cli/install.md b/docs/tools/flow-cli/install.md index f506763e9b..da038a7089 100644 --- a/docs/tools/flow-cli/install.md +++ b/docs/tools/flow-cli/install.md @@ -1,7 +1,7 @@ --- title: Install Instructions description: How to install the Flow command-line interface (CLI) -sidebar_position: 2 +sidebar_position: 1 --- The Flow CLI can be installed on macOS, Windows (7 or greater) and most Linux systems. diff --git a/docs/tools/flow-cli/lint.md b/docs/tools/flow-cli/lint.md new file mode 100644 index 0000000000..05f09d1fdd --- /dev/null +++ b/docs/tools/flow-cli/lint.md @@ -0,0 +1,33 @@ +--- +title: Cadence Linter +description: A static-analysis tool for finding potential issues in Cadence code +sidebar_position: 14 +--- + +The Cadence Linter is a static-analysis tool for finding potential issues in Cadence code. It is available in the Flow CLI & is designed to help developers write better code by identifying common mistakes and potential issues before they become problems. + +The linter will also check your code for any syntax or semantic errors, and provide suggestions for how to fix them. + +```shell +flow cadence lint [files] +``` + +## Example Usage + +```shell +flow cadence lint **/*.cdc +``` + +## Example Output + +```shell +test.cdc:27:6: semantic-error: cannot find variable in this scope: `abc` + +test.cdc:35:6: removal-hint: unnecessary force operator + +2 problems (1 error, 1 warning) +``` + +:::info +The Cadence Linter is also available in the [Cadence VSCode extension](../vscode-extension/index.mdx), which provides real-time feedback as you write your code. +::: \ No newline at end of file diff --git a/docs/tools/flow-cli/migrate/_category_.json b/docs/tools/flow-cli/migrate/_category_.json index 2c294afb9c..9b80866f59 100644 --- a/docs/tools/flow-cli/migrate/_category_.json +++ b/docs/tools/flow-cli/migrate/_category_.json @@ -1,4 +1,4 @@ { "label": "Migrate Projects to 1.0", - "position": 11 + "position": 12 } diff --git a/docs/tools/flow-cli/scripts/_category_.json b/docs/tools/flow-cli/scripts/_category_.json index 57b43c8b02..390abd60a3 100644 --- a/docs/tools/flow-cli/scripts/_category_.json +++ b/docs/tools/flow-cli/scripts/_category_.json @@ -1,4 +1,4 @@ { "label": "Scripts", - "position": 7 + "position": 6 } \ No newline at end of file diff --git a/docs/tools/flow-cli/tests/_category_.json b/docs/tools/flow-cli/tests/_category_.json index 82535f1307..b6f8c563b2 100644 --- a/docs/tools/flow-cli/tests/_category_.json +++ b/docs/tools/flow-cli/tests/_category_.json @@ -1,4 +1,4 @@ { "label": "Tests", - "position": 11, + "position": 13 } \ No newline at end of file