Closed per1234 closed 6 years ago
Thanks!
Whoops. There's a bigger typo that I need to fix.
I'm amazed, how did you find that error so quickly? I'm guessing you have scripts that scan all the proposed additions to the lib manager?
Oops, I didn't check whether the keyword was actually relevant to this library. Well, at least it brought it to your attention.
I have no script as of yet, though I do have one planned. I check each library to make sure it meets the Library Manager inclusion requirements before labeling the issue and while I'm at it I check for a couple other common issues such as the keywords separator.
BTW, the Arduino IDE requires a single true tab separator between keyword and identifier. Multiple tabs do appear to work because the Arduino IDE defaults to editor.function.style
for unrecognized keyword identifiers and it just sees the empty field after the first tab as an unrecognized identifier:
In this keywords.txt the only difference this causes is that OpenLog
is not bold:
vs. the keywords with single tab separators:
A similar problem occurs if there is a space between the separator and the identifier. The space is seen as part of the identifier and causes it to be unrecognized. Several of this library's keywords have this but it doesn't actually matter in this case since the fallback keywords style happens to be the same as the intended style.
I had to turn on all symbols in NP++ to see the extra chars. Thanks! I'll get that corrected and try to use it as the template for future SparkFun libs.
I finished the aforementioned script and have been using it for a while now.
This is the script that detects common problems with libraries:
https://github.com/per1234/arduino-ci-script
(specifically the check_keywords_txt
, check_library_properties
, check_library_structure
, and check_library_manager_compliance
functions)
This is the script that automatically generates a list of all the Arduino libraries on GitHub: https://github.com/per1234/inoliblist
This is the script that runs the first script on all the libraries in the list: https://github.com/per1234/inolibbuglist
It was an interesting project.
This is really neat! Nice work!
The Arduino IDE currently requires the use of a tab separator between the name and identifier. Without this tab the keyword is not highlighted.
Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords