Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Moved CTagsRunner command into builder package
Signed-off-by: Cristian Maglie <[email protected]>
  • Loading branch information
cmaglie committed Nov 17, 2016
commit a4ede088e7f5fa67fd7c2f12b94e3124126bae00
3 changes: 1 addition & 2 deletions src/arduino.cc/builder/container_add_prototypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"path/filepath"

"arduino.cc/builder/constants"
"arduino.cc/builder/ctags"
"arduino.cc/builder/i18n"
"arduino.cc/builder/types"
)
Expand All @@ -47,7 +46,7 @@ func (s *ContainerAddPrototypes) Run(ctx *types.Context) error {
&ReadFileAndStoreInContext{Target: &ctx.SourceGccMinusE},
&FilterSketchSource{Source: &ctx.SourceGccMinusE},
&CTagsTargetFileSaver{Source: &ctx.SourceGccMinusE, TargetFileName: constants.FILE_CTAGS_TARGET_FOR_GCC_MINUS_E},
&ctags.CTagsRunner{},
&CTagsRunner{},
&PrototypesAdder{},
&SketchSaver{},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
* Copyright 2015 Arduino LLC (http://www.arduino.cc/)
*/

package ctags
package builder

import (
"fmt"

"arduino.cc/builder/constants"
"arduino.cc/builder/ctags"
"arduino.cc/builder/i18n"
"arduino.cc/builder/types"
"arduino.cc/builder/utils"
Expand Down Expand Up @@ -72,7 +73,7 @@ func (s *CTagsRunner) Run(ctx *types.Context) error {

ctx.CTagsOutput = string(sourceBytes)

parser := &CTagsParser{}
parser := &ctags.CTagsParser{}
ctx.CTagsOfPreprocessedSource = parser.Parse(ctx.CTagsOutput)
protos, line := parser.GeneratePrototypes()
if line != -1 {
Expand Down
20 changes: 10 additions & 10 deletions src/arduino.cc/builder/test/ctags_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
package test

import (
"arduino.cc/builder"
"arduino.cc/builder/constants"
"arduino.cc/builder/ctags"
"arduino.cc/builder/types"
"github.com/stretchr/testify/require"
"os"
"path/filepath"
"strings"
"testing"

"arduino.cc/builder"
"arduino.cc/builder/constants"
"arduino.cc/builder/types"
"github.com/stretchr/testify/require"
)

func TestCTagsRunner(t *testing.T) {
Expand Down Expand Up @@ -71,7 +71,7 @@ func TestCTagsRunner(t *testing.T) {
&builder.PrintUsedLibrariesIfVerbose{},
&builder.WarnAboutArchIncompatibleLibraries{},
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
&ctags.CTagsRunner{},
&builder.CTagsRunner{},
}

for _, command := range commands {
Expand Down Expand Up @@ -121,7 +121,7 @@ func TestCTagsRunnerSketchWithClass(t *testing.T) {
&builder.PrintUsedLibrariesIfVerbose{},
&builder.WarnAboutArchIncompatibleLibraries{},
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
&ctags.CTagsRunner{},
&builder.CTagsRunner{},
}

for _, command := range commands {
Expand Down Expand Up @@ -169,7 +169,7 @@ func TestCTagsRunnerSketchWithTypename(t *testing.T) {
&builder.PrintUsedLibrariesIfVerbose{},
&builder.WarnAboutArchIncompatibleLibraries{},
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
&ctags.CTagsRunner{},
&builder.CTagsRunner{},
}

for _, command := range commands {
Expand Down Expand Up @@ -216,7 +216,7 @@ func TestCTagsRunnerSketchWithNamespace(t *testing.T) {
&builder.PrintUsedLibrariesIfVerbose{},
&builder.WarnAboutArchIncompatibleLibraries{},
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
&ctags.CTagsRunner{},
&builder.CTagsRunner{},
}

for _, command := range commands {
Expand Down Expand Up @@ -262,7 +262,7 @@ func TestCTagsRunnerSketchWithTemplates(t *testing.T) {
&builder.PrintUsedLibrariesIfVerbose{},
&builder.WarnAboutArchIncompatibleLibraries{},
&builder.CTagsTargetFileSaver{Source: &ctx.Source, TargetFileName: constants.FILE_CTAGS_TARGET},
&ctags.CTagsRunner{},
&builder.CTagsRunner{},
}

for _, command := range commands {
Expand Down