Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
377 views
in Technique[技术] by (71.8m points)

Show all warnings and errors in visual studio code

I'am using Visual Studio Code Version 1.6.0. Is there any possibility to show errors and warnings of all files in the current root folder?

At the moment it shows only errors and warnings for open files.

question from:https://stackoverflow.com/questions/39997022/show-all-warnings-and-errors-in-visual-studio-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

UPDATE 2019

ES-Lint has introduced a new task in VS Code. You have to enable it in the workspace setings.

"eslint.lintTask.enable": true

Just go to terminal menu and select run task, then choose

eslint: lint whole folder

You can also auto-fix most problems by running the following command in the terminal:

.
ode_modules.bineslint.cmd --fix .

Reference: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

While we still await the problem scanner in VS Code, this is a good enough alternative if you use eslint.


OLD ANSWER

Here is how you can see all problems in less than 10 seconds.

You use a little trick.

Open replace all in files Ctrl + Shift + H.

Replace ; with ;

Hit replace all. That's it. Now, check Problems.

The assumption here is that all files have at least one semicolon. For bigger projects, if you get a warning asking you to refine your search, just enter something that is common in all files but is not present a lot.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...