8000 Fix casing of assembly sketch files (#1231) · arduino/arduino-cli@8726c3a · GitHub
[go: up one dir, main page]

Skip to content

Commit 8726c3a

Browse files
authored
Fix casing of assembly sketch files (#1231)
1 parent 0ddb024 commit 8726c3a

File tree

5 files changed

+7
-7
lines changed
  • arduino
  • legacy/builder
  • 5 files changed

    +7
    -7
    lines changed

    arduino/builder/sketch.go

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -187,7 +187,7 @@ func SketchLoad(sketchPath, buildPath string) (*sketch.Sketch, error) {
    187187
    }
    188188

    189189
    // ignore if file extension doesn't match
    190-
    ext := strings.ToLower(filepath.Ext(path))
    190+
    ext := filepath.Ext(path)
    191191
    _, isMain := globals.MainFileValidExtensions[ext]
    192192
    _, isAdditional := globals.AdditionalFileValidExtensions[ext]
    193193
    if !(isMain || isAdditional) {

    arduino/globals/globals.go

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -35,13 +35,13 @@ var (
    3535
    ".hpp": empty,
    3636
    ".hh": empty,
    3737
    ".cpp": empty,
    38-
    ".s": empty,
    38+
    ".S": empty,
    3939
    }
    4040

    4141
    // SourceFilesValidExtensions lists valid extensions for source files (no headers)
    4242
    SourceFilesValidExtensions = map[string]struct{}{
    4343
    ".c": empty,
    4444
    ".cpp": empty,
    45-
    ".s": empty,
    45+
    ".S": empty,
    4646
    }
    4747
    )

    arduino/sketch/sketch.go

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -99,7 +99,7 @@ func New(sketchFolderPath, mainFilePath, buildPath string, allFilesPaths []strin
    9999
    otherSketchFiles := []*Item{}
    100100
    rootFolderFiles := []*Item{}
    101101
    for p, item := range pathToItem {
    102-
    ext := strings.ToLower(filepath.Ext(p))
    102+
    ext := filepath.Ext(p)
    103103
    if _, found := globals.MainFileValidExtensions[ext]; found {
    104104
    // item is a valid main file, see if it's stored at the
    105105
    // sketch root and ignore if it's not.

    legacy/builder/builder.go

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -31,8 +31,8 @@ import (
    3131
    )
    3232

    3333
    var MAIN_FILE_VALID_EXTENSIONS = map[string]bool{".ino": true, ".pde": true}
    34-
    var ADDITIONAL_FILE_VALID_EXTENSIONS = map[string]bool{".h": true, ".c": true, ".hpp": true, ".hh": true, ".cpp": true, ".s": true}
    35-
    var ADDITIONAL_FILE_VALID_EXTENSIONS_NO_HEADERS = map[string]bool{".c": true, ".cpp": true, ".s": true}
    34+
    var ADDITIONAL_FILE_VALID_EXTENSIONS = map[string]bool{".h": true, ".c": true, ".hpp": true, ".hh": true, ".cpp": true, ".S": true}
    35+
    var ADDITIONAL_FILE_VALID_EXTENSIONS_NO_HEADERS = map[string]bool{".c": true, ".cpp": true, ".S": true}
    3636

    3737
    const DEFAULT_DEBUG_LEVEL = 5
    3838
    const DEFAULT_WARNINGS_LEVEL = "none"

    legacy/builder/create_cmake_rule.go

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -32,7 +32,7 @@ import (
    3232
    "github.com/arduino/arduino-cli/legacy/builder/utils"
    3333
    )
    3434

    35-
    var VALID_EXPORT_EXTENSIONS = map[string]bool{".h": true, ".c": true, ".hpp": true, ".hh": true, ".cpp": true, ".s": true, ".a": true, ".properties": true}
    35+
    var VALID_EXPORT_EXTENSIONS = map[string]bool{".h": true, ".c": true, ".hpp": true, ".hh": true, ".cpp": true, ".S": true, ".a": true, ".properties": true}
    3636
    var DOTHEXTENSION = map[string]bool{".h": true, ".hh": true, ".hpp": true}
    3737
    var DOTAEXTENSION = map[string]bool{".a": true}
    3838

    0 commit comments

    Comments
     (0)
    0