Skip to content

Commit 809540a

Browse files
committed
Disable LP048 for ARDUINO_LINT_LIBRARY_MANAGER_INDEXING mode
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.
1 parent 609854e commit 809540a

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

internal/rule/ruleconfiguration/ruleconfiguration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ var configurations = []Type{
10101010
Brief: "depends not in index",
10111011
Description: "This field should be used to define the dependencies available from Library Manager. Library names are case-sensitive.",
10121012
MessageTemplate: "library.properties depends field item(s) {{.}} not found in the Library Manager index.",
1013-
DisableModes: nil,
1013+
DisableModes: []rulemode.Type{rulemode.LibraryManagerIndexing},
10141014
EnableModes: []rulemode.Type{rulemode.Default},
10151015
InfoModes: nil,
10161016
WarningModes: []rulemode.Type{rulemode.Default},

test/test_all.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ def test_library_manager_invalid(run_command):
9797

9898
def test_library_manager_indexing(run_command):
9999
result = run_command(
100-
cmd=[test_data_path.joinpath("library-manager", "Update")],
100+
cmd=[test_data_path.joinpath("library-manager", "ARDUINO_LINT_LIBRARY_MANAGER_INDEXING", "Servo")],
101101
custom_env={"ARDUINO_LINT_LIBRARY_MANAGER_INDEXING": "true"},
102102
)
103103
assert result.ok
104104

105105
result = run_command(
106-
cmd=[test_data_path.joinpath("library-manager", "Update")],
106+
cmd=[test_data_path.joinpath("library-manager", "ARDUINO_LINT_LIBRARY_MANAGER_INDEXING", "Servo")],
107107
custom_env={"ARDUINO_LINT_LIBRARY_MANAGER_INDEXING": "foo"},
108108
)
109109
assert not result.ok

test/testdata/library-manager/ARDUINO_LINT_LIBRARY_MANAGER_INDEXING/Servo/Servo.h

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=Servo
2+
version=1.1.7
3+
author=Michael Margolis, Arduino
4+
maintainer=Arduino <info@arduino.cc>
5+
sentence=Allows Arduino/Genuino boards to control a variety of servo motors.
6+
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 />
7+
category=Device Control
8+
url=http://www.arduino.cc/en/Reference/Servo
9+
architectures=avr,megaavr,sam,samd,nrf52,stm32f4,mbed
10+
depends=Arduino_nonexistent

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy