Arduino Lint: False-positive Symlink error due to gitignored node_modules

Hi all :wave:,

I'm developing my first Arduino library. I use arduino-lint as part of a Node.js-based dev setup, where tools like arduino-cli, clang-format, and arduino-lint are downloaded via npm (using a small helper CLI).

My project structure includes a node_modules directory that is .gitignored and will not be published to GitHub or included in the Arduino Library Manager. However, when I run arduino-lint, I get this error:

ERROR: Symlink(s) found. Symlinks cause difficulties for Windows users. These block addition to the Arduino Library     
       Manager index:                                                                                                   
         /path/to/project/node_modules/.bin/gat
         /path/to/project/node_modules/.bin/mkdirp
       (Rule LS005)

This seems to be a false positive, since these symlinks live under a node_modules/ folder that is explicitly excluded from version control and packaging.

Questions:
1. Is there a way to tell arduino-lint to ignore node_modules/ or respect .gitignore?
2. Is this worth filing as a feature request (e.g., "ignore common development directories like node_modules when checking for symlinks")?
3. What's the current best practice if I want to use Node.js to manage dev tools in my Arduino library project?

My setup:

tree -L 2 -I node_modules .
.
β”œβ”€β”€ arduino-lint
β”œβ”€β”€ clang-format
β”œβ”€β”€ examples
β”‚   β”œβ”€β”€ DemoServer
β”‚   └── WiFiDemo
β”œβ”€β”€ library.properties
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
└── src
    β”œβ”€β”€ ESP32WiFiCrashUploader.cpp
    └── ESP32WiFiCrashUploader.h

5 directories, 10 files
cat .gitignore 
node_modules
arduino-lint*
clang-format*
npm run lint

> esp32-wifi-crash-uploader@1.0.0 lint
> ./arduino-lint

Linting library in /Users/akoskitta/dev/git/esp32-wifi-crash-uploader
ERROR: Symlink(s) found. Symlinks cause difficulties for Windows users. These block addition to the Arduino Library     
       Manager index:                                                                                                   
         /Users/akoskitta/dev/git/esp32-wifi-crash-uploader/node_modules/.bin/gat                                       
         /Users/akoskitta/dev/git/esp32-wifi-crash-uploader/node_modules/.bin/mkdirp                                    
       (Rule LS005)                                                                                                     

Linter results for project: 1 ERRORS, 0 WARNINGS

-------------------

Linting sketch in /Users/akoskitta/dev/git/esp32-wifi-crash-uploader/examples/WiFiDemo

Linter results for project: no errors or warnings

-------------------

Linter results for projects: 1 ERRORS, 0 WARNINGS

Thank you!


If there is a more appropriate category for asking specifically about the GitHub - arduino/arduino-lint: Tool to check for problems with Arduino projects project, please let me know.

Moved to Allow disabling `LS005` (symlink) and `LS007` (`.exe`) if the file is gitignored Β· Issue #894 Β· arduino/arduino-lint Β· GitHub

1 Like