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

Commit 6de3054

Browse files
elektronikworkshophlovdal
authored andcommitted
IntelliSense auto gen respected global and project specific dis-/enable flags for analyze only. Now these flags have the same effect during regular builds.
1 parent d7ad51c commit 6de3054

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/arduino/arduino.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,9 @@ Please make sure the folder is not occupied by other procedures .`);
555555
}
556556
}
557557
const stdoutcb = (line: string) => {
558-
cocopa.callback(line);
558+
if (cocopa.callback) {
559+
cocopa.callback(line);
560+
}
559561
if (verbose) {
560562
arduinoChannel.channel.append(line);
561563
}

src/arduino/intellisense.ts

+11
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ export function isCompilerParserEnabled(dc?: DeviceContext) {
5656
*/
5757
export function makeCompilerParserContext(dc: DeviceContext): ICoCoPaContext {
5858

59+
// TODO: callback for local setting: when IG gen is re-enabled file
60+
// analysis trigger. Perhaps for global possible as well?
61+
if (!isCompilerParserEnabled(dc)) {
62+
return {
63+
callback: undefined,
64+
conclude: async () => {
65+
arduinoChannel.info("IntelliSense auto-configuration disabled.");
66+
},
67+
};
68+
}
69+
5970
const engines = makeCompilerParserEngines(dc);
6071
const runner = new ccp.Runner(engines);
6172

0 commit comments

Comments
 (0)