File tree Expand file tree Collapse file tree 6 files changed +64
-2
lines changed
workflow-templates/assets
deploy-cobra-mkdocs-versioned-poetry Expand file tree Collapse file tree 6 files changed +64
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ indent_style = space
25
25
indent_size = 2
26
26
indent_style = space
27
27
28
- [* .go ]
28
+ [* .{go,mod} ]
29
29
indent_style = tab
30
30
31
31
[* .java ]
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ tasks :
4
+ docs:gen :
5
+ desc : Generate command reference
6
+ dir : ./docsgen
7
+ cmds :
8
+ # docs will generate examples using os.Args[0] so we need to call
9
+ # the generator `arduino-lint`
10
+ - go build -o arduino-lint{{exeExt}}
11
+ # we invoke `arduino-lint` like this instead of `./arduino-lint` to remove
12
+ # the `./` chars from the examples
13
+ - PATH=. arduino-lint ../docs/commands
14
+ - task : docs:format
Original file line number Diff line number Diff line change
1
+ module github.com/arduino/arduino-lint/docsgen
2
+
3
+ go 1.14
4
+
5
+ replace github.com/arduino/arduino-lint => ../
6
+
7
+ require (
8
+ github.com/arduino/arduino-lint v0.0.0
9
+ github.com/spf13/cobra v1.1.1
10
+ )
Original file line number Diff line number Diff line change
1
+ // This file is part of arduino-cli.
2
+ //
3
+ // Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
4
+ //
5
+ // This software is released under the GNU General Public License version 3,
6
+ // which covers the main part of arduino-cli.
7
+ // The terms of this license can be found at:
8
+ // https://www.gnu.org/licenses/gpl-3.0.en.html
9
+ //
10
+ // You can be released from the requirements of the above licenses by purchasing
11
+ // a commercial license. Buying such a license is mandatory if you want to
12
+ // modify or otherwise use the software for commercial activities involving the
13
+ // Arduino software without disclosing the source code of your own applications.
14
+ // To purchase a commercial license, send an email to license@arduino.cc.
15
+
16
+ // Package main generates Markdown documentation for the Arduino Lint CLI.
17
+ package main
18
+
19
+ import (
20
+ "os"
21
+
22
+ "github.com/arduino/arduino-lint/internal/cli"
23
+ "github.com/spf13/cobra/doc"
24
+ )
25
+
26
+ func main () {
27
+ if len (os .Args ) < 2 {
28
+ print ("error: Please provide the output folder argument" )
29
+ os .Exit (1 )
30
+ }
31
+
32
+ cli := cli .Root ()
33
+ cli .DisableAutoGenTag = true // Disable addition of auto-generated date stamp
34
+ err := doc .GenMarkdownTree (cli , os .Args [1 ])
35
+ if err != nil {
36
+ panic (err )
37
+ }
38
+ }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ indent_style = space
25
25
indent_size = 2
26
26
indent_style = space
27
27
28
- [* .go ]
28
+ [* .{go,mod} ]
29
29
indent_style = tab
30
30
31
31
[* .java ]
You can’t perform that action at this time.
0 commit comments