Skip to content

Commit

Permalink
Merge pull request #173 from per1234/indexing-depends
Browse files Browse the repository at this point in the history
Disable LP048 for ARDUINO_LINT_LIBRARY_MANAGER_INDEXING mode
  • Loading branch information
per1234 authored May 19, 2021
2 parents 609854e + 809540a commit 57756ad
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/rule/ruleconfiguration/ruleconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ var configurations = []Type{
Brief: "depends not in index",
Description: "This field should be used to define the dependencies available from Library Manager. Library names are case-sensitive.",
MessageTemplate: "library.properties depends field item(s) {{.}} not found in the Library Manager index.",
DisableModes: nil,
DisableModes: []rulemode.Type{rulemode.LibraryManagerIndexing},
EnableModes: []rulemode.Type{rulemode.Default},
InfoModes: nil,
WarningModes: []rulemode.Type{rulemode.Default},
Expand Down
4 changes: 2 additions & 2 deletions test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ def test_library_manager_invalid(run_command):

def test_library_manager_indexing(run_command):
result = run_command(
cmd=[test_data_path.joinpath("library-manager", "Update")],
cmd=[test_data_path.joinpath("library-manager", "ARDUINO_LINT_LIBRARY_MANAGER_INDEXING", "Servo")],
custom_env={"ARDUINO_LINT_LIBRARY_MANAGER_INDEXING": "true"},
)
assert result.ok

result = run_command(
cmd=[test_data_path.joinpath("library-manager", "Update")],
cmd=[test_data_path.joinpath("library-manager", "ARDUINO_LINT_LIBRARY_MANAGER_INDEXING", "Servo")],
custom_env={"ARDUINO_LINT_LIBRARY_MANAGER_INDEXING": "foo"},
)
assert not result.ok
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name=Servo
version=1.1.7
author=Michael Margolis, Arduino
maintainer=Arduino <[email protected]>
sentence=Allows Arduino/Genuino boards to control a variety of servo motors.
paragraph=This library can control a great number of servos.<br />It makes careful use of timers: the library can control 12 servos using only 1 timer.<br />On the Arduino Due you can control up to 60 servos.<br />
category=Device Control
url=http://www.arduino.cc/en/Reference/Servo
architectures=avr,megaavr,sam,samd,nrf52,stm32f4,mbed
depends=Arduino_nonexistent

0 comments on commit 57756ad

Please sign in to comment.