Skip to content

Commit 0a29800

Browse files
committed
feat(analyzer): added command line options for diagnostics modifiers to code command
1 parent 610b1f3 commit 0a29800

File tree

10 files changed

+174
-86
lines changed

10 files changed

+174
-86
lines changed

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
// "-i",
6565
// "-v", "CMD_LINE_VAR:cmd_line_var",
6666
// "E:\\source\\uvtestprj\\tests\\first.robotrepl"
67-
"analyze",
68-
"code",
67+
// "analyze",
68+
// "code",
6969
// "tests"
70-
// "repl",
70+
"repl",
7171
// "-v",
7272
// "asd:asd"
7373

docs/03_reference/cli.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,26 @@ robotcode analyze code [OPTIONS] [PATHS]...
317317
Specifies the diagnostics codes to ignore.
318318

319319

320+
- `-me, --modifiers-error CODE`
321+
322+
Specifies the diagnostics codes to treat as errors.
323+
324+
325+
- `-mw, --modifiers-warning CODE`
326+
327+
Specifies the diagnostics codes to treat as warning.
328+
329+
330+
- `-mI, --modifiers-information CODE`
331+
332+
Specifies the diagnostics codes to treat as information.
333+
334+
335+
- `-mh, --modifiers-hint CODE`
336+
337+
Specifies the diagnostics codes to treat as hint.
338+
339+
320340
- `--help`
321341

322342
Show this message and exit.
@@ -624,12 +644,12 @@ robotcode debug [OPTIONS] [ROBOT_OPTIONS_AND_ARGS]...
624644

625645
- `--tcp [<ADDRESS>:]<PORT>`
626646

627-
Run in `tcp` server mode and listen at the given port. (Equivalent to `--mode tcp --port <port>`) *NOTE:* This option is mutually exclusive with options: port, pipe-server, mode, pipe-name.
647+
Run in `tcp` server mode and listen at the given port. (Equivalent to `--mode tcp --port <port>`) *NOTE:* This option is mutually exclusive with options: mode, port, pipe-server, pipe-name.
628648

629649

630650
- `--pipe-server NAME`
631651

632-
Run in `pipe-server` mode and listen at the given pipe name. (Equivalent to `--mode pipe-server --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, mode, port, tcp, pipe-name.
652+
Run in `pipe-server` mode and listen at the given pipe name. (Equivalent to `--mode pipe-server --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, mode, tcp, port, pipe-name.
633653

634654

635655
- `--mode [tcp|pipe-server]`
@@ -649,7 +669,7 @@ robotcode debug [OPTIONS] [ROBOT_OPTIONS_AND_ARGS]...
649669

650670
- `--pipe-name NAME`
651671

652-
The pipe to listen on or connect to. (Only valid in `pipe` and `pipe-server` mode) *NOTE:* This option is mutually exclusive with options: tcp, bind, pipe-server, port. [env var: ROBOTCODE_PIPE_NAME]
672+
The pipe to listen on or connect to. (Only valid in `pipe` and `pipe-server` mode) *NOTE:* This option is mutually exclusive with options: bind, tcp, port, pipe-server. [env var: ROBOTCODE_PIPE_NAME]
653673

654674

655675
- `--version`
@@ -676,47 +696,47 @@ robotcode debug-launch [OPTIONS]
676696
**Options:**
677697
- `--stdio`
678698

679-
Run in `stdio` mode. (Equivalent to `--mode stdio`) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, mode, port, tcp, pipe-server, pipe-name. [env var: ROBOTCODE_STDIO]
699+
Run in `stdio` mode. (Equivalent to `--mode stdio`) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, mode, tcp, port, pipe-server, pipe-name. [env var: ROBOTCODE_STDIO]
680700

681701

682702
- `--tcp [<ADDRESS>:]<PORT>`
683703

684-
Run in `tcp` server mode and listen at the given port. (Equivalent to `--mode tcp --port <port>`) *NOTE:* This option is mutually exclusive with options: socket, pipe, mode, port, stdio, pipe-server, pipe-name.
704+
Run in `tcp` server mode and listen at the given port. (Equivalent to `--mode tcp --port <port>`) *NOTE:* This option is mutually exclusive with options: socket, pipe, mode, port, pipe-server, pipe-name, stdio.
685705

686706

687707
- `--socket [<ADDRESS>:]<PORT>`
688708

689-
Run in `socket` mode and connect to the given port. (Equivalent to `--mode socket --port <port>`) *NOTE:* This option is mutually exclusive with options: pipe, mode, port, tcp, stdio, pipe-server, pipe-name.
709+
Run in `socket` mode and connect to the given port. (Equivalent to `--mode socket --port <port>`) *NOTE:* This option is mutually exclusive with options: pipe, mode, tcp, port, pipe-server, pipe-name, stdio.
690710

691711

692712
- `--pipe NAME`
693713

694-
Run in `pipe` mode and connect to the given pipe name. (Equivalent to `--mode pipe --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, socket, mode, port, tcp, stdio, pipe-server, pipe-name.
714+
Run in `pipe` mode and connect to the given pipe name. (Equivalent to `--mode pipe --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, socket, mode, tcp, port, pipe-server, pipe-name, stdio.
695715

696716

697717
- `--pipe-server NAME`
698718

699-
Run in `pipe-server` mode and listen at the given pipe name. (Equivalent to `--mode pipe-server --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, mode, port, tcp, stdio, pipe-name.
719+
Run in `pipe-server` mode and listen at the given pipe name. (Equivalent to `--mode pipe-server --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, mode, tcp, port, pipe-name, stdio.
700720

701721

702722
- `--mode [stdio|tcp|socket|pipe|pipe-server]`
703723

704-
The mode to use for the debug launch server. *NOTE:* This option is mutually exclusive with options: socket, tcp, stdio, pipe-server, pipe. [env var: ROBOTCODE_MODE; default: stdio]
724+
The mode to use for the debug launch server. *NOTE:* This option is mutually exclusive with options: socket, pipe, tcp, pipe-server, stdio. [env var: ROBOTCODE_MODE; default: stdio]
705725

706726

707727
- `--port PORT`
708728

709-
The port to listen on or connect to. (Only valid for `tcp` and `socket mode`) *NOTE:* This option is mutually exclusive with options: pipe-server, pipe-name, pipe. [env var: ROBOTCODE_PORT; default: 6611; 1<=x<=65535]
729+
The port to listen on or connect to. (Only valid for `tcp` and `socket mode`) *NOTE:* This option is mutually exclusive with options: pipe-name, pipe-server, pipe. [env var: ROBOTCODE_PORT; default: 6611; 1<=x<=65535]
710730

711731

712732
- `--bind ADDRESS`
713733

714-
Specify alternate bind address. If no address is specified `localhost` is used. (Only valid for tcp and socket mode) *NOTE:* This option is mutually exclusive with options: pipe-server, pipe-name, pipe. [env var: ROBOTCODE_BIND; default: 127.0.0.1]
734+
Specify alternate bind address. If no address is specified `localhost` is used. (Only valid for tcp and socket mode) *NOTE:* This option is mutually exclusive with options: pipe-name, pipe-server, pipe. [env var: ROBOTCODE_BIND; default: 127.0.0.1]
715735

716736

717737
- `--pipe-name NAME`
718738

719-
The pipe to listen on or connect to. (Only valid in `pipe` and `pipe-server` mode) *NOTE:* This option is mutually exclusive with options: bind, socket, port, tcp, stdio, pipe-server, pipe. [env var: ROBOTCODE_PIPE_NAME]
739+
The pipe to listen on or connect to. (Only valid in `pipe` and `pipe-server` mode) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, tcp, port, pipe-server, stdio. [env var: ROBOTCODE_PIPE_NAME]
720740

721741

722742
- `--version`
@@ -1146,27 +1166,27 @@ robotcode language-server [OPTIONS] [PATHS]...
11461166
**Options:**
11471167
- `--stdio`
11481168

1149-
Run in `stdio` mode. (Equivalent to `--mode stdio`) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, mode, port, tcp, pipe-name. [env var: ROBOTCODE_STDIO]
1169+
Run in `stdio` mode. (Equivalent to `--mode stdio`) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, mode, tcp, port, pipe-name. [env var: ROBOTCODE_STDIO]
11501170

11511171

11521172
- `--tcp [<ADDRESS>:]<PORT>`
11531173

1154-
Run in `tcp` server mode and listen at the given port. (Equivalent to `--mode tcp --port <port>`) *NOTE:* This option is mutually exclusive with options: socket, pipe, mode, port, stdio, pipe-name.
1174+
Run in `tcp` server mode and listen at the given port. (Equivalent to `--mode tcp --port <port>`) *NOTE:* This option is mutually exclusive with options: socket, pipe, mode, port, pipe-name, stdio.
11551175

11561176

11571177
- `--socket [<ADDRESS>:]<PORT>`
11581178

1159-
Run in `socket` mode and connect to the given port. (Equivalent to `--mode socket --port <port>`) *NOTE:* This option is mutually exclusive with options: pipe, mode, port, tcp, stdio, pipe-name.
1179+
Run in `socket` mode and connect to the given port. (Equivalent to `--mode socket --port <port>`) *NOTE:* This option is mutually exclusive with options: pipe, mode, tcp, port, pipe-name, stdio.
11601180

11611181

11621182
- `--pipe NAME`
11631183

1164-
Run in `pipe` mode and connect to the given pipe name. (Equivalent to `--mode pipe --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, socket, mode, port, tcp, stdio, pipe-name.
1184+
Run in `pipe` mode and connect to the given pipe name. (Equivalent to `--mode pipe --pipe-name <name>`) *NOTE:* This option is mutually exclusive with options: bind, socket, mode, tcp, port, pipe-name, stdio.
11651185

11661186

1167-
- `--mode [tcp|stdio|socket|pipe]`
1187+
- `--mode [stdio|tcp|socket|pipe]`
11681188

1169-
The mode to use for the debug launch server. *NOTE:* This option is mutually exclusive with options: tcp, stdio, socket, pipe. [env var: ROBOTCODE_MODE; default: stdio]
1189+
The mode to use for the debug launch server. *NOTE:* This option is mutually exclusive with options: stdio, tcp, socket, pipe. [env var: ROBOTCODE_MODE; default: stdio]
11701190

11711191

11721192
- `--port PORT`
@@ -1181,7 +1201,7 @@ robotcode language-server [OPTIONS] [PATHS]...
11811201

11821202
- `--pipe-name NAME`
11831203

1184-
The pipe to listen on or connect to. (Only valid in `pipe` and `pipe-server` mode) *NOTE:* This option is mutually exclusive with options: bind, socket, port, tcp, stdio, pipe. [env var: ROBOTCODE_PIPE_NAME]
1204+
The pipe to listen on or connect to. (Only valid in `pipe` and `pipe-server` mode) *NOTE:* This option is mutually exclusive with options: bind, socket, pipe, tcp, port, stdio. [env var: ROBOTCODE_PIPE_NAME]
11851205

11861206

11871207
- `--version`

docs/03_reference/config.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,7 +2732,7 @@ extend-information = ["MultipleKeywords"]
27322732

27332733
Type: `list[str] | None`
27342734

2735-
Specifies the error codes to treat as errors.
2735+
Specifies the diagnostics codes to treat as errors.
27362736

27372737
Examples:
27382738

@@ -2745,7 +2745,7 @@ error = ["VariableNotFound", "multiple-keywords"]
27452745

27462746
Type: `list[str] | None`
27472747

2748-
Extend the error codes to treat as errors.
2748+
Extend the diagnostics codes to treat as errors.
27492749

27502750
Examples:
27512751

@@ -2758,7 +2758,7 @@ extend_error = ["VariableNotFound", "multiple-keywords"]
27582758

27592759
Type: `list[str] | None`
27602760

2761-
Extend the error codes to treat as hint.
2761+
Extend the diagnostics codes to treat as hint.
27622762

27632763
Examples:
27642764

@@ -2771,7 +2771,7 @@ extend_hint = ["VariableNotFound", "multiple-keywords"]
27712771

27722772
Type: `list[str] | None`
27732773

2774-
Extend the error codes to ignore.
2774+
Extend the diagnostics codes to ignore.
27752775

27762776
Examples:
27772777

@@ -2784,7 +2784,7 @@ extend_ignore = ["VariableNotFound", "multiple-keywords"]
27842784

27852785
Type: `list[str] | None`
27862786

2787-
Extend the error codes to treat as information.
2787+
Extend the diagnostics codes to treat as information.
27882788

27892789
Examples:
27902790

@@ -2797,7 +2797,7 @@ extend_information = ["VariableNotFound", "multiple-keywords"]
27972797

27982798
Type: `list[str] | None`
27992799

2800-
Extend the error codes to treat as warnings.
2800+
Extend the diagnostics codes to treat as warning.
28012801

28022802
Examples:
28032803

@@ -2810,7 +2810,7 @@ extend_warning = ["VariableNotFound", "multiple-keywords"]
28102810

28112811
Type: `list[str] | None`
28122812

2813-
Specifies the error codes to treat as hint.
2813+
Specifies the diagnostics codes to treat as hint.
28142814

28152815
Examples:
28162816

@@ -2823,7 +2823,7 @@ hint = ["VariableNotFound", "multiple-keywords"]
28232823

28242824
Type: `list[str] | None`
28252825

2826-
Specifies the error codes to ignore.
2826+
Specifies the diagnostics codes to ignore.
28272827

28282828
Examples:
28292829

@@ -2836,7 +2836,7 @@ ignore = ["VariableNotFound", "multiple-keywords"]
28362836

28372837
Type: `list[str] | None`
28382838

2839-
Specifies the error codes to treat as information.
2839+
Specifies the diagnostics codes to treat as information.
28402840

28412841
Examples:
28422842

@@ -2849,7 +2849,7 @@ information = ["VariableNotFound", "multiple-keywords"]
28492849

28502850
Type: `list[str] | None`
28512851

2852-
Specifies the error codes to treat as warning.
2852+
Specifies the diagnostics codes to treat as warning.
28532853

28542854
Examples:
28552855

@@ -2889,7 +2889,7 @@ information = ["MultipleKeywords"]
28892889

28902890
Type: `list[str] | None`
28912891

2892-
Specifies the error codes to treat as errors.
2892+
Specifies the diagnostics codes to treat as errors.
28932893

28942894
Examples:
28952895

@@ -2902,7 +2902,7 @@ error = ["VariableNotFound", "multiple-keywords"]
29022902

29032903
Type: `list[str] | None`
29042904

2905-
Extend the error codes to treat as errors.
2905+
Extend the diagnostics codes to treat as errors.
29062906

29072907
Examples:
29082908

@@ -2915,7 +2915,7 @@ extend_error = ["VariableNotFound", "multiple-keywords"]
29152915

29162916
Type: `list[str] | None`
29172917

2918-
Extend the error codes to treat as hint.
2918+
Extend the diagnostics codes to treat as hint.
29192919

29202920
Examples:
29212921

@@ -2928,7 +2928,7 @@ extend_hint = ["VariableNotFound", "multiple-keywords"]
29282928

29292929
Type: `list[str] | None`
29302930

2931-
Extend the error codes to ignore.
2931+
Extend the diagnostics codes to ignore.
29322932

29332933
Examples:
29342934

@@ -2941,7 +2941,7 @@ extend_ignore = ["VariableNotFound", "multiple-keywords"]
29412941

29422942
Type: `list[str] | None`
29432943

2944-
Extend the error codes to treat as information.
2944+
Extend the diagnostics codes to treat as information.
29452945

29462946
Examples:
29472947

@@ -2954,7 +2954,7 @@ extend_information = ["VariableNotFound", "multiple-keywords"]
29542954

29552955
Type: `list[str] | None`
29562956

2957-
Extend the error codes to treat as warnings.
2957+
Extend the diagnostics codes to treat as warning.
29582958

29592959
Examples:
29602960

@@ -2967,7 +2967,7 @@ extend_warning = ["VariableNotFound", "multiple-keywords"]
29672967

29682968
Type: `list[str] | None`
29692969

2970-
Specifies the error codes to treat as hint.
2970+
Specifies the diagnostics codes to treat as hint.
29712971

29722972
Examples:
29732973

@@ -2980,7 +2980,7 @@ hint = ["VariableNotFound", "multiple-keywords"]
29802980

29812981
Type: `list[str] | None`
29822982

2983-
Specifies the error codes to ignore.
2983+
Specifies the diagnostics codes to ignore.
29842984

29852985
Examples:
29862986

@@ -2993,7 +2993,7 @@ ignore = ["VariableNotFound", "multiple-keywords"]
29932993

29942994
Type: `list[str] | None`
29952995

2996-
Specifies the error codes to treat as information.
2996+
Specifies the diagnostics codes to treat as information.
29972997

29982998
Examples:
29992999

@@ -3006,7 +3006,7 @@ information = ["VariableNotFound", "multiple-keywords"]
30063006

30073007
Type: `list[str] | None`
30083008

3009-
Specifies the error codes to treat as warning.
3009+
Specifies the diagnostics codes to treat as warning.
30103010

30113011
Examples:
30123012

0 commit comments

Comments
 (0)