Prevent Linter errors


#1

Hi!

There’s a way to prevent this errors without add Arduino.h to each file?

'millis' was not declared in this scope
'byte' was not declared in this scope

I have Arduino.h included on first file and build works very well.

Best regards.


#2

This is a problem of Arduino and its INO syntax. They messy people and learn them how to write invalid C/C++ code. Please use include guards. See https://en.wikipedia.org/wiki/Include_guard


#3

Hi!

I have #pragma once to every header file now.

But the problem is not the file being included multiples times.

The problem is Linter doesn’t look to all files as a single project. It just look for current tab.

So I have all this errors.

Best regards.


#4

See comparison table here (scroll down) https://platformio.org/platformio-ide

Atom is not intended for advanced C/C++ development. Please switch to PlatformIO IDE for VSCode.


#5

Hi!

Thanks for your reply.

I have installed VSCode but, now I have others errors. :smiley:

This errors came from?

Best regards.


#6

So the problem has no solution for now.
I have a big amount of errors with Linter and another big amount with IntelliSense.
The problem with IntelliSense was related here: https://github.com/Microsoft/vscode-cpptools/issues/2377


#7

As I remember, you can disable some files from linting. We can’t help here while this issue depends on Microsoft C/C++ extension. Sorry.