Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit ca4fd19

Browse files
elektronikworkshophlovdal
authored andcommitted
* Fixed regression introduced with adaptions to latest version of cocopa
* Made compile command regex match more stringent
1 parent dfccdba commit ca4fd19

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/arduino/arduino.ts

+13-4
Original file line numberDiff line numberDiff line change
@@ -804,16 +804,25 @@ Please make sure the folder is not occupied by other procedures .`);
804804
callback: undefined,
805805
conclude: undefined,
806806
}
807-
};
808-
807+
};
808+
/**
809+
*
810+
* @param dc
811+
*/
809812
private makeCompilerParserEngines(dc: DeviceContext) {
813+
814+
let sketch = path.basename(dc.sketch);
815+
const dotcpp= sketch.endsWith(".ino") ? ".cpp" : "";
816+
sketch = `-o\\s+\\S*${ccp.regExEscape(sketch)}${dotcpp}\\.o`;
817+
810818
const matchPattern = [
811819
// trigger parser when compiling the main sketch
812-
` ${path.basename(dc.sketch)}.cpp.o`,
820+
RegExp(sketch),
813821
];
822+
814823
const dontMatchPattern = [
815824
// make sure Arduino's not testing libraries
816-
/-o\s\/dev\/null/,
825+
/-o\s+\/dev\/null/,
817826
];
818827

819828
// setup the parser with its engines

0 commit comments

Comments
 (0)