Arduino-CI / arduino_ci

Unit testing and Continuous Integration (CI) for Arduino libraries, from a Ruby gem
Apache License 2.0
110 stars 34 forks source link

Add ability to report compilation warnings, optionally fail on them #100

Open ianfixes opened 5 years ago

ianfixes commented 5 years ago

verify_sketch stdout: Invalid library found in /Users/ikatz/Documents/Arduino/libraries/arduino_ci: no headers files (.h) found in /Users/ikatz/Documents/Arduino/libraries/arduino_ci Invalid library found in /Users/ikatz/Documents/Arduino/libraries/CompileSomething: no headers files (.h) found in /Users/ikatz/Documents/Arduino/libraries/CompileSomething Invalid library found in /Users/ikatz/Documents/Arduino/libraries/arduino_ci: no headers files (.h) found in /Users/ikatz/Documents/Arduino/libraries/arduino_ci Invalid library found in /Users/ikatz/Documents/Arduino/libraries/CompileSomething: no headers files (.h) found in /Users/ikatz/Documents/Arduino/libraries/CompileSomething Sketch uses 22084 bytes (4%) of program storage space. Maximum is 524288 bytes.

This can be found in the ret[:err] of ArduinoCmd.verify_sketch:

Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
/path/to/arduino_ci/spec/FakeSketch/FakeSketch.ino: In function 'void setup()':
/path/to/arduino_ci/spec/FakeSketch/FakeSketch.ino:1:21: warning: statement has no effect [-Wunused-value]
 void setup(void) { 0; }
                     ^
/path/to/arduino_ci/spec/FakeSketch/FakeSketch.ino: In function 'void loop()':
/path/to/arduino_ci/spec/FakeSketch/FakeSketch.ino:2:20: warning: statement has no effect [-Wunused-value]
 void loop(void) { 0; }

Would need to

  1. get a regex that can find warning lines reliably
  2. need to reject lines that aren't part of the current project
  3. decide how to store them
  4. decide how to configure errors against them
ianfixes commented 5 years ago

Issue #100 🎉