Skip to content

Arduino Lint Error #1095

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

Open
gwilherm opened this issue Nov 17, 2024 · 1 comment
Open

Arduino Lint Error #1095

gwilherm opened this issue Nov 17, 2024 · 1 comment

Comments

@gwilherm
Copy link

Hello,
This is not really a feature request but it is also not a bug report,
I would love to see Control-Surface available in the official arduino library registry.
This allows to include the library directly with the arduino IDE, and in projects using sketch project file that make projects more distributable

For this, there are some rules and the library must pass the linter with no error.
https://github.com/arduino/library-registry/blob/main/FAQ.md#submission-requirements

Arduino has created a command line tool to check libraries for compliance with all the Library Manager requirements:
https://github.com/arduino/arduino-lint

The tool detects one error on the library (see the logs below)

I admit that the error is questionable (arduino/arduino-cli#990, arduino/arduino-lint#588) for the test directory.
The solution proposed is to move the test directory into a folder named extras.
I understand this is kinda intrusive to change the repository architecture like this, but this would be really nice to find your library in the registry.

WARNING: library.properties name Control Surface contains spaces. Although supported, best practices is to not use      
         spaces.                                                                                                        
         See: https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format         
         (Rule LP015)                                                                                                   
ERROR: Sketch(es) found outside examples and extras folders:                                               
         Control-Surface/examples.old/medium-old/Audio/OLED-Demo-Audio                                     
         Control-Surface/examples.old/medium-old/Audio/VUMeterLEDs-USB-DAC                                 
         Control-Surface/examples.old/medium-old/Audio/VUMeterOLED-USB-DAC                                 
         Control-Surface/examples.old/medium-old/Display/OLED-Demo                                         
         Control-Surface/examples.old/medium-old/Display/VU-Bridge                                         
         Control-Surface/examples.old/medium-old/Display/VU-Bridge-Dual-Display                            
         Control-Surface/examples.old/medium-old/ESP32/VU-Bridge-ESP32                                     
         Control-Surface/examples.old/medium-old/ExtendedInputOutput/Ex.1.Shift-Register-LED-Effects       
         Control-Surface/examples.old/medium-old/ExtendedInputOutput/Multiplexer-AnalogReadSerial          
         Control-Surface/examples.old/medium-old/ExtendedInputOutput/PushButtonsToggleLEDsShiftRegMultiplex
         Control-Surface/examples.old/medium-old/ExtendedInputOutput/SPIShiftRegisterBlink                 
         Control-Surface/examples.old/medium-old/ExtendedInputOutput/ShiftRegisterBlink                    
         Control-Surface/examples.old/medium-old/Getting-Started                                           
         Control-Surface/examples.old/medium-old/MIDIInput/LED                                             
         Control-Surface/examples.old/medium-old/MIDIInput/MCU_VULEDs-ShiftRegister                        
         Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCIncrementDecrementButtons     
         Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCPotentiometer                 
         Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCPotentiometer-Map             
         Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCRotaryEncoder                 
         Control-Surface/examples.old/medium-old/MIDIOutput/Enable-disable                                 
         Control-Surface/examples.old/medium-old/MIDIOutput/Notes/NoteButtonMatrixKeyboard                 
         Control-Surface/examples.old/medium-old/MIDIOutput/Notes/NoteChordButton                          
         Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtons                              
         Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtonsLEDs                          
         Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtonsLEDsNoMIDIFeedback            
         Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtonsLEDsShiftRegMultiplex         
         Control-Surface/examples.old/medium-old/MIDI_Interfaces/Bluetooth-BLE-MIDI-CCPotentiometer        
         Control-Surface/examples.old/medium-old/MIDI_Interfaces/Bluetooth-BLE-MIDI-NoteButton             
         Control-Surface/examples.old/medium-old/MIDI_Interfaces/Bluetooth-BLE-MIDI-NoteButton_Input       
         Control-Surface/examples.old/medium-old/Other/MIDI_Callback                                       
         Control-Surface/examples.old/medium-old/ProgramChange/ProgramChanger                              
         Control-Surface/examples.old/medium-old/Transpose/EncoderSelector-Transpose                       
         Control-Surface/examples.old/medium-old/Transpose/EncoderSelectorLEDs-Transpose                   
         Control-Surface/examples.old/medium-old/Transpose/EncoderSelectorLEDs-Transpose-Generate-Array    
         Control-Surface/examples.old/medium-old/Transpose/Transpose                                       
         Control-Surface/test/Construction/ErrorCheckAllMIDIOutputs                                        
         Control-Surface/test/tools/sketches/midi-echo                                                     
         Control-Surface/test/tools/sketches/midi-receive                                                  
         Control-Surface/test/tools/sketches/midi-send                                                     
       See: https://arduino.github.io/arduino-cli/latest/library-specification/#library-examples           
       (Rule LD003)                                                                                        

Linter results for project: 1 ERRORS, 1 WARNINGS

Regards,
Gwilherm

@per1234
Copy link

per1234 commented Apr 25, 2025

there are some rules and the library must pass the linter with no error.

This is correct. However, note that it is only required to pass with Arduino Lint's compliance level set to "permissive":

https://arduino.github.io/arduino-lint/latest/commands/arduino-lint/#options

At the "permissive" level, rule violations are only treated as an error if they result in an effective defect in usability.

The rule violation that caused the rejection of the Library Manager submission was:

arduino/library-registry#5444 (comment)

ERROR: Symlink(s) found. Symlinks cause difficulties for Windows users. These block addition to the Arduino Library     
       Manager index:                                                                                                   
         Control-Surface/doxygen/pages/xbm.md                                                                           
       (Rule LS005)                                                                                                     

Note that the violation of Arduino Lint rule LD003 that you report here was only treated as a warning:

WARNING: Sketch(es) found outside examples and extras folders:                                               
           Control-Surface/examples.old/medium-old/Audio/OLED-Demo-Audio                                     
           Control-Surface/examples.old/medium-old/Audio/VUMeterLEDs-USB-DAC                                 
           Control-Surface/examples.old/medium-old/Audio/VUMeterOLED-USB-DAC                                 
           Control-Surface/examples.old/medium-old/Display/OLED-Demo                                         
           Control-Surface/examples.old/medium-old/Display/VU-Bridge                                         
           Control-Surface/examples.old/medium-old/Display/VU-Bridge-Dual-Display                            
           Control-Surface/examples.old/medium-old/ESP32/VU-Bridge-ESP32                                     
           Control-Surface/examples.old/medium-old/ExtendedInputOutput/Ex.1.Shift-Register-LED-Effects       
           Control-Surface/examples.old/medium-old/ExtendedInputOutput/Multiplexer-AnalogReadSerial          
           Control-Surface/examples.old/medium-old/ExtendedInputOutput/PushButtonsToggleLEDsShiftRegMultiplex
           Control-Surface/examples.old/medium-old/ExtendedInputOutput/SPIShiftRegisterBlink                 
           Control-Surface/examples.old/medium-old/ExtendedInputOutput/ShiftRegisterBlink                    
           Control-Surface/examples.old/medium-old/Getting-Started                                           
           Control-Surface/examples.old/medium-old/MIDIInput/LED                                             
           Control-Surface/examples.old/medium-old/MIDIInput/MCU_VULEDs-ShiftRegister                        
           Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCIncrementDecrementButtons     
           Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCPotentiometer                 
           Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCPotentiometer-Map             
           Control-Surface/examples.old/medium-old/MIDIOutput/Control-Change/CCRotaryEncoder                 
           Control-Surface/examples.old/medium-old/MIDIOutput/Enable-disable                                 
           Control-Surface/examples.old/medium-old/MIDIOutput/Notes/NoteButtonMatrixKeyboard                 
           Control-Surface/examples.old/medium-old/MIDIOutput/Notes/NoteChordButton                          
           Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtons                              
           Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtonsLEDs                          
           Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtonsLEDsNoMIDIFeedback            
           Control-Surface/examples.old/medium-old/MIDIOutput/Notes/PushButtonsLEDsShiftRegMultiplex         
           Control-Surface/examples.old/medium-old/MIDI_Interfaces/Bluetooth-BLE-MIDI-CCPotentiometer        
           Control-Surface/examples.old/medium-old/MIDI_Interfaces/Bluetooth-BLE-MIDI-NoteButton             
           Control-Surface/examples.old/medium-old/MIDI_Interfaces/Bluetooth-BLE-MIDI-NoteButton_Input       
           Control-Surface/examples.old/medium-old/Other/MIDI_Callback                                       
           Control-Surface/examples.old/medium-old/ProgramChange/ProgramChanger                              
           Control-Surface/examples.old/medium-old/Transpose/EncoderSelector-Transpose                       
           Control-Surface/examples.old/medium-old/Transpose/EncoderSelectorLEDs-Transpose                   
           Control-Surface/examples.old/medium-old/Transpose/EncoderSelectorLEDs-Transpose-Generate-Array    
           Control-Surface/examples.old/medium-old/Transpose/Transpose                                       
           Control-Surface/examples.old/very-old/Ex.01.Potentiometer                                         
           Control-Surface/examples.old/very-old/Ex.02.Button                                                
           Control-Surface/examples.old/very-old/Ex.03.Rotary-Encoder                                        
           Control-Surface/examples.old/very-old/Ex.04.Swtich                                                
           Control-Surface/examples.old/very-old/Ex.05.HiRes-Potentiometer                                   
           Control-Surface/examples.old/very-old/Ex.06.Banks                                                 
           Control-Surface/examples.old/very-old/Ex.07.BankSelectors                                         
           Control-Surface/examples.old/very-old/Ex.08.Potentiometer-Calibrate                               
           Control-Surface/examples.old/very-old/Ex.09.Bank-Calibrate                                        
           Control-Surface/examples.old/very-old/Ex.10.Debug-MIDI                                            
           Control-Surface/examples.old/very-old/Ex.11.Button-Matrix                                         
           Control-Surface/examples.old/very-old/Ex.12.AnalogMultiplex                                       
           Control-Surface/examples.old/very-old/Ex.13.Shift-Register                                        
           Control-Surface/examples.old/very-old/Ex.14.LED                                                   
           Control-Surface/examples.old/very-old/Ex.15.LED-Shift-Register                                    
           Control-Surface/examples.old/very-old/Ex.16.ProgramSelector                                       
           Control-Surface/examples.old/very-old/Ex.17.Transposer                                            
           Control-Surface/examples.old/very-old/MIDI_Controller_finished_example                            
           Control-Surface/examples.old/very-old/OLED-Demo                                                   
           Control-Surface/test/Construction/ErrorCheckAllMIDIOutputs                                        
         See: https://arduino.github.io/arduino-cli/latest/library-specification/#library-examples           
         (Rule LD003)                                                                                        

we display warnings when processing Library Manager submissions in order to bring to the maintainer's attention possible best practices changes that could enhance the usability of the library, but warnings do not block acceptance of a library to Library Manager.

By default, Arduino Lint uses the "specification" compliance level, which enforces full compliance with the Arduino Library Specification. The reason why you saw that error when you ran Arduino Lint is because you did not add the --compliance permissive flag to the command you used.


So the only thing that is blocking the ability to add the library to Library Manager is the presence of a symlink.

The symlink has already been removed from the library:
ed57f9b. However, Library Manager works exclusively from Git tags, and there hasn't been a tag since the time of the fix. So the checks would continue to fail until a tag has been pushed to the repository that contains a fix. This means that the only thing that needs to be done to allow the addition of the library to Library Manager is for a maintainer to push a tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants