Comments (12)
What about using -fsyntax-only flag? I tested it and the linter is working, saving header files doesn't generate anything anymore and the only disadvantage of this solution is the lack of any information about linker errors (but without -fsyntax-only flag linter isn't giving any details about the latters anyway, only "ld returned 1 exit status" error).
from linter-gcc.
Hello. I'm afraid this is unavoidable. When you run g++ -c headerfile.h
, GCC compiles the header and generates headerfile.h.gch
. I'm sorry but I haven't found a way of preventing g++ from generating these files. If you do, please feel free to re-open this issue. However, if you are hosting a C/C++ project on github, you can simply add *.gch
to your .gitignore
file to tell git to ignore these files.
from linter-gcc.
Hello, so the reason behind the creation of the headerfile.h.gch file is so atom can tell if there is an syntax error?
from linter-gcc.
I have just done some reading and it turns out there is a way to avoid actual compilation. The way to do this is by supplying the -gnats
option to GCC. More info here
Edit: I've just tried using the -gnats
option and it looks like it doesn't work.
from linter-gcc.
Is there a way of disabling linting on .h files? In some situations the spontaneous creation of .gch files is very unhelpful.
from linter-gcc.
Yes that's actually not a bad idea. I can add a regex field to generalise this so the user can choose to exclude files matching a certain pattern. What do you think?
from linter-gcc.
If that works, then you can simply add that to your flags. No need to add an extra option for header files.
from linter-gcc.
So, we have a solution :)
from linter-gcc.
I'll add a note in the README about this.
from linter-gcc.
@Toreno96: Thanks, that works nicely!
from linter-gcc.
Wow, thanks @Toreno96!
from linter-gcc.
Just a heads up, I know this is an old thread but I have found saving using "Save All" in the file menu or on MacOS CMD+OPTION/ALT+S works and avoids .gch files being made. This I believe, for whatever reason skips the linter on save and simply saves the file. I expect however if you are relying on syntax checking your file it may be skipped in this case.
from linter-gcc.
Related Issues (20)
- Linter isn't showing issues (c/c++) HOT 2
- it stops working since the 1.34.0 atom update HOT 2
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 2
- linter-gcc doesn't work HOT 4
- consider this project dead if this issue is not removed (latest commit was on 2017 jan) HOT 3
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 2
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 2
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Object.dirname is deprecated.
- Uncaught TypeError: Cannot read property 'binary' of undefined
- Relative paths are relative to Atom's $PWD, not the project root
- string variables not highlighted
- Colors in the linter panel
- I cant install atom linter gcc.its shows"npm WARN deprecated [email protected]: No longer maintained - Use lodash probably npm ERR! Unexpected end of JSON input while parsing near '...MGZNbL9YcGBJl4MH4nrxH' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\stark siv\.atom\.apm\_logs\2020-12-26T17_25_37_936Z-debug.log" A little help is appreciated,♥ HOT 2
- Just want my GCH address for open sea? HOT 1
- Cannot find module 'tempfile'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter-gcc.