Skip to content

Commit a4ede08

Browse files
committed
Moved CTagsRunner command into builder package
Signed-off-by: Cristian Maglie <[email protected]>
1 parent f1fe3ba commit a4ede08

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/arduino.cc/builder/container_add_prototypes.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"path/filepath"
3434

3535
"arduino.cc/builder/constants"
36-
"arduino.cc/builder/ctags"
3736
"arduino.cc/builder/i18n"
3837
"arduino.cc/builder/types"
3938
)
@@ -47,7 +46,7 @@ func (s *ContainerAddPrototypes) Run(ctx *types.Context) error {
4746
&ReadFileAndStoreInContext{Target: &ctx.SourceGccMinusE},
4847
&FilterSketchSource{Source: &ctx.SourceGccMinusE},
4948
&CTagsTargetFileSaver{Source: &ctx.SourceGccMinusE, TargetFileName: constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E},
50-
&ctags.CTagsRunner{},
49+
&CTagsRunner{},
5150
&PrototypesAdder{},
5251
&SketchSaver{},
5352
}

src/arduino.cc/builder/ctags/ctags_runner.go renamed to src/arduino.cc/builder/ctags_runner.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
2828
*/
2929

30-
package ctags
30+
package builder
3131

3232
import (
3333
"fmt"
3434

3535
"arduino.cc/builder/constants"
36+
"arduino.cc/builder/ctags"
3637
"arduino.cc/builder/i18n"
3738
"arduino.cc/builder/types"
3839
"arduino.cc/builder/utils"
@@ -72,7 +73,7 @@ func (s *CTagsRunner) Run(ctx *types.Context) error {
7273

7374
ctx.CTagsOutput = string(sourceBytes)
7475

75-
parser := &CTagsParser{}
76+
parser := &ctags.CTagsParser{}
7677
ctx.CTagsOfPreprocessedSource = parser.Parse(ctx.CTagsOutput)
7778
protos, line := parser.GeneratePrototypes()
7879
if line != -1 {

src/arduino.cc/builder/test/ctags_runner_test.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
package test
3131

3232
import (
33-
"arduino.cc/builder"
34-
"arduino.cc/builder/constants"
35-
"arduino.cc/builder/ctags"
36-
"arduino.cc/builder/types"
37-
"github.com/stretchr/testify/require"
3833
"os"
3934
"path/filepath"
4035
"strings"
4136
"testing"
37+
38+
"arduino.cc/builder"
39+
"arduino.cc/builder/constants"
40+
"arduino.cc/builder/types"
41+
"github.com/stretchr/testify/require"
4242
)
4343

4444
func TestCTagsRunner(t *testing.T) {
@@ -71,7 +71,7 @@ func TestCTagsRunner(t *testing.T) {
7171
&builder.PrintUsedLibrariesIfVerbose{},
7272
&builder.WarnAboutArchIncompatibleLibraries{},
7373
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
74-
&ctags.CTagsRunner{},
74+
&builder.CTagsRunner{},
7575
}
7676

7777
for _, command := range commands {
@@ -121,7 +121,7 @@ func TestCTagsRunnerSketchWithClass(t *testing.T) {
121121
&builder.PrintUsedLibrariesIfVerbose{},
122122
&builder.WarnAboutArchIncompatibleLibraries{},
123123
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
124-
&ctags.CTagsRunner{},
124+
&builder.CTagsRunner{},
125125
}
126126

127127
for _, command := range commands {
@@ -169,7 +169,7 @@ func TestCTagsRunnerSketchWithTypename(t *testing.T) {
169169
&builder.PrintUsedLibrariesIfVerbose{},
170170
&builder.WarnAboutArchIncompatibleLibraries{},
171171
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
172-
&ctags.CTagsRunner{},
172+
&builder.CTagsRunner{},
173173
}
174174

175175
for _, command := range commands {
@@ -216,7 +216,7 @@ func TestCTagsRunnerSketchWithNamespace(t *testing.T) {
216216
&builder.PrintUsedLibrariesIfVerbose{},
217217
&builder.WarnAboutArchIncompatibleLibraries{},
218218
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
219-
&ctags.CTagsRunner{},
219+
&builder.CTagsRunner{},
220220
}
221221

222222
for _, command := range commands {
@@ -262,7 +262,7 @@ func TestCTagsRunnerSketchWithTemplates(t *testing.T) {
262262
&builder.PrintUsedLibrariesIfVerbose{},
263263
&builder.WarnAboutArchIncompatibleLibraries{},
264264
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
265-
&ctags.CTagsRunner{},
265+
&builder.CTagsRunner{},
266266
}
267267

268268
for _, command := range commands {

0 commit comments

Comments
 (0)