Skip to content

add support to analyze a specific Visual Studio configuration#1795

Closed
fuzzelhjb wants to merge 7 commits into
cppcheck-opensource:masterfrom
fuzzelhjb:master
Closed

add support to analyze a specific Visual Studio configuration#1795
fuzzelhjb wants to merge 7 commits into
cppcheck-opensource:masterfrom
fuzzelhjb:master

Conversation

@fuzzelhjb

Copy link
Copy Markdown
Contributor

on the command line use --vscfg= to define a Visual Studio configuration that is then used for the analysis.
(e.g. --vscfg="Release|Win32" will only check this configuraton.
In addition to the command line the GUI and the GUI project file .cppcheck was also changed to support this feature from the GUI.

@danmar

danmar commented Apr 10, 2019

Copy link
Copy Markdown
Collaborator

I like this idea. It is like an extension to the "Analyze all VS configs".

However I do not want to have this option directly on the command line. Just ensure that this option is read in ImportProject::importCppcheckGuiProject

@danmar

danmar commented Apr 10, 2019

Copy link
Copy Markdown
Collaborator

I made some updates today in the GUI that caused conflicts for this pull request. :-(

We'll deal with that later.

@fuzzelhjb

fuzzelhjb commented Apr 10, 2019 via email

Copy link
Copy Markdown
Contributor Author

@danmar

danmar commented Apr 11, 2019

Copy link
Copy Markdown
Collaborator

Would be nice if it can be added in the next official release.

yes I agree.

If we merge this within a month it should be safe. But after that, I do not know.

@fuzzelhjb

Copy link
Copy Markdown
Contributor Author

Just updated the python html report script with a 'toggle all' button. That is usefull if you deal with a lot of different messages.

@danmar

danmar commented May 21, 2019

Copy link
Copy Markdown
Collaborator

please update the python html report in a separate PR.

@danmar

danmar commented May 21, 2019

Copy link
Copy Markdown
Collaborator

So you would just add it to the GUI and in the cppcheck file format? I think that works also, adding it to the command line was faster without fiddling with QT

For information... I would like that you do this implementation.

There is a checkbox in the GUI where you can choose to check all configurations or just 1 configuration. If it's ok with just on/off for you then we do not need to tweak the GUI.. but we need to ensure that this option is used in the command line tool.

@danmar

danmar commented May 21, 2019

Copy link
Copy Markdown
Collaborator

but we need to ensure that this option is used in the command line tool.

I can see that there is handling for this in the command line tool nowadays. Does it work good enough for you as it is?

@fuzzelhjb

fuzzelhjb commented May 21, 2019 via email

Copy link
Copy Markdown
Contributor Author

@danmar

danmar commented May 22, 2019

Copy link
Copy Markdown
Collaborator

hmm it would be a good idea to use a separate branch for each PR.

Does this work?

# save changes in a branch "pr1"
git branch pr1
# clear your changes
git reset --hard 466caabbf211393c45a68040777240cf5c9e749c
# update your fork
git remote add upstream git://github.com/danmar/cppcheck.git
git pull upstream master
# create a new branch for the htmlreport changes
git checkout -b htmlreport
...do some changes...
git commit -a
# push your changes
git push -u origin htmlreport
# now create a new PR based on your htmlreport branch.

fuzzelhjb added 3 commits May 24, 2019 08:46
@danmar

danmar commented May 24, 2019

Copy link
Copy Markdown
Collaborator

I close this PR as I believe you no longer need this PR open.

@danmar danmar closed this May 24, 2019
@lg2de

lg2de commented Jan 22, 2020

Copy link
Copy Markdown
Contributor

Why this PR has been closed?
How about the feature to analyze a single configuration only?

@danmar

danmar commented Jan 24, 2020

Copy link
Copy Markdown
Collaborator

@lg2de I still think this sounds like a very useful feature.

I suggested that an option is added in the GUI project dialog. That will be required in the long run anyway if we have this feature. And then a command line user can import the GUI project if he wants to use this feature.

@danmar

danmar commented Jan 24, 2020

Copy link
Copy Markdown
Collaborator

@lg2de @fuzzelhjb I have mixed feelings about adding a vscfg on the command line right now. It might be ok to add such a option. However in the long run this feature must be available in the GUI also. Is there interest to continue working on this?

@lg2de

lg2de commented Jan 24, 2020

Copy link
Copy Markdown
Contributor

Yes, it would be interesting.
I just started analyzing using --project option. There I found that now the DEBUG configuration is analyzed. Before - when only sources files were identified without the corresponding project file - the DEBUG code (e.g. in unit tests) was ignored.
For me the GUI feature is not relevant. I'm using CppCheck only within build process for SonarQube integration.

@danmar

danmar commented Jan 25, 2020

Copy link
Copy Markdown
Collaborator

For me the GUI feature is not relevant. I'm using CppCheck only within build process for SonarQube integration.

Yes.. but surely you can have 1 extra file for cppcheck configuration somewhere.

I don't want to add all possible options in the CLI. When a utility has 1000 command line options it's hard to know if it has the option you need. I like to have a basic set of options on the CLI command line.

@fuzzelhjb

fuzzelhjb commented Jan 25, 2020 via email

Copy link
Copy Markdown
Contributor Author

@lg2de

lg2de commented Jan 26, 2020

Copy link
Copy Markdown
Contributor

Once your new PR is merged I'll try to add the command line option. This is the feature I need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants