Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable LP048 for ARDUINO_LINT_LIBRARY_MANAGER_INDEXING mode #173

Merged
merged 1 commit into from
May 19, 2021
Merged

Disable LP048 for ARDUINO_LINT_LIBRARY_MANAGER_INDEXING mode #173

merged 1 commit into from
May 19, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented May 19, 2021

This rule checks for the presence of the library's library.properties depends items in the library index. Since the
library index is not available when in ARDUINO_LINT_LIBRARY_MANAGER_INDEXING mode, this rule can not run.

Before this change, attempting to lint a library with a library.properties depends field when in ARDUINO_LINT_LIBRARY_MANAGER_INDEXING mode resulted in a panic:

panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
github.com/arduino/arduino-lint/internal/rule/rulefunction.nameInLibraryManagerIndex(0xc000160206, 0x19, 0xddae1d)
        /home/build/internal/rule/rulefunction/library.go:1447 +0x1be
github.com/arduino/arduino-lint/internal/rule/rulefunction.LibraryPropertiesDependsFieldNotInIndex(0xdcd21e, 0x18, 0xc0005a1890)
        /home/build/internal/rule/rulefunction/library.go:1181 +0x224
github.com/arduino/arduino-lint/internal/rule.Runner(0xc0008ea050, 0x1, 0x1)
        /home/build/internal/rule/rule.go:53 +0x2e5
github.com/arduino/arduino-lint/internal/command.ArduinoLint(0xc0000ee580, 0x160b2a0, 0x0, 0x0)
        /home/build/internal/command/command.go:76 +0x219
github.com/spf13/cobra.(*Command).execute(0xc0000ee580, 0xc000088190, 0x0, 0x0, 0xc0000ee580, 0xc000088190)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:854 +0x2a4
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000ee580, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
main.main()
        /home/build/main.go:32 +0x32

This rule checks for the presence of the library's library.properties `depends` items in the library index. Since the
library index is not available when in `ARDUINO_LINT_LIBRARY_MANAGER_INDEXING` mode, this rule can not run.
@per1234 per1234 added type: bug topic: code Related to content of the project itself labels May 19, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #173 (809540a) into main (609854e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #173   +/-   ##
=======================================
  Coverage   84.34%   84.34%           
=======================================
  Files          43       43           
  Lines        2971     2971           
=======================================
  Hits         2506     2506           
  Misses        373      373           
  Partials       92       92           
Flag Coverage Δ
unit 84.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ternal/rule/ruleconfiguration/ruleconfiguration.go 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 609854e...809540a. Read the comment docs.

@per1234 per1234 merged commit 57756ad into arduino:main May 19, 2021
@per1234 per1234 deleted the indexing-depends branch May 19, 2021 13:05
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants