Variable naming conventions verifier for C/C++ [duplicate] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one for C/C++. I am not looking for a lint-like static code analyzer, I only would like to check against coding standards like variable naming, capitalization, spacing, identation, bracket placement, and so on.

The only tool I know is Vera. Haven't used it, though, so can't comment how viable it is. Demo looks promising.

Google c++lint from Google code style guide.

I'm sure this could help to some degree cxx checker. Also this tool seems to be pretty good KWStyle It's from Kitware, the guys who develop Cmake.

Not exactly what you ask for, but I've found it easier to just all agree on a coding standard astyle can generate and then automate the process.

Try nsiqcppstyle. It's a Python based coding style checker for C/C++. It's easy to extend to add your own rules.

There's a list. There is also a putative C++ frontend on splint.

I have used a tool in my work its LDRA tool suite
It is used for testing the c/c++ code but it also can check against coding standards such as MISRA etc.

Check universalindentgui on sourceforge.net.
it has many style checkers for C and you can customise the checkers.

There is cppcheck which is supported also by Hudson via the plugin of the same name.

Check Metrix++ http://metrixplusplus.sourceforge.net/. It may require some extensions which are specific for your needs.

Check out Abraxas Code Check
http://www.abxsoft.com/codchk_user.html

I'm currently working on a project with another project to write just such a tool. I looked at other static code analysis tools and decided that I could do better.
Unfortunately, the project is not yet ready to be used without fairly intimate knowledge of the code (read: it's buggy as all hell). However, we're moving fairly quickly, and hope to have a beta release within the next 8 weeks.
The project is open source - you can visit the project page, and if you want to get involved, we'd love some more external input.
I won't bore you with the details - you can visit the project page for that, but I will say one thing: Most static code analysis tools are aimed at checking your code for mistakes, and not very concerned with checking for coding guidelines. We have taken a more flexible approach that allows us to write plugiins to check for both "house rules" as well as possible bugs.
If you want any more information, please don't hesitate to contact me.
Cheers,

Related

lightweight html control for desktop apps (C++/Windows) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am currently using RichText control in my program. It creates several instances of RichText control (hundreds) because it’s a sticky notes program.
I wish to replace it with a lightweight HTML control which will have functionality similar to RichText control (text formatting, bullets, links, images etc)
Do you know if any free/commercial lightweight HTML control that I can use in my C++/MFC program?
Thanks.
There is the free HTMLayout engine by Terra Informatica: http://www.terrainformatica.com/htmlayout/main.whtm
It's mostly used as a skinning engine for applications, but there might be an editing mode, too, since they built a WYSIWYG editor with their own library.
Since you're on Windows, is there any reason you don't want to use the MSHTML control? It's available in MFC through CHtmlView. Since it is used by so much of the other parts of the O/S, the DLLs are likely already loaded, so instantiating it is going to be pretty quick.
We use it in our projects and it has a comprehensive COM API (IWebBrowser) with events feedback too.
I don't know the per-instance memory/CPU cost, so you may need to take some measurements.
There's always WebKit, as used by Apple Safari, Google Chrome and lots of others.
I hesitate suggesting this because it's essentially a whole framework for one component, but wxWidgets has a very simple and lightweight implementation, wxHTML.
The library can be built with as little or as much as you need, so you should be able to build with just wxHTML and whatever dependencies it requires. As far as I know it can be mixed with MFC without consequence. (Although, if you felt like it, rewriting your whole app in wx would make it cross platform.)
I would stress that it's a very basic implementation, so if you need something more robust it might not be the best. wxWebConnect wraps WebKit in wx if you need a full browser, but at that point there's probably a better, more MFC-centric solution.
If you're feeling especially adventurous and don't want any wxWidgets dependencies but like the lightweight wxHTML, you could always dive into the wxWidgets source and extract the windows-specific code for that control.
(I attempted to link to both the wxWidgets site and wxWebConnect for your reference, but it appears I can only add one link to my post. Google them if you like.)
There's XStandard.

Recommendations for an open-source project to help an experienced developer practice C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for recommendations for open-source projects written in C++ that will help me "get my chops back". A little background:
I've been working heavily in Java for the last three years, doing a lot of back-end development and system design, but with a fair amount of work in the presentation layer stuff, too.
The last C++ projects I worked on were a Visual C++ 6 project (designed to interact with Visual Basic) for mobile devices and several projects using the GNU toolchain circa gcc versions 2.x to 3.2
I'm looking to get back up to speed on the language and learn some of the popular frameworks, specifically the basics of boost (although boost seems fairly sprawling to me, similar to the kitchen-sink feel of Spring in the java space) and test driven development in C++.
What I'm looking for:
Specific recommendations for small to mid-size open source projects to poke through and perhaps contribute to as I level my C++ skills back up. The problem domain isn't important, except that I would like to work on something in a new area to broaden my experience.
Edit:
A few people have commented that it's difficult to provide a recommendation without some indication of the problem domain I'd like to work in. So, I've decided that I'm most interested in graphics applications or games, two areas which I haven't worked in before.
If you like visual stuff, openFrameworks is a C++ Framework for doing Processing-type applications. http://www.openframeworks.cc/ I'm not sure how viable it still is, but it looked pretty cool.
It's hard to suggest something like this, you really don't have any itches you want to scratch??
I would personally be working on Unladen Swallow if I wasn't absurdly busy starting my own personal venture. Dynamic language optimisation looks pretty cool to me.
You could also look at Wt
Why not Boost itself? It's a very active project, it's right at the core of what C++ is about, and it could need some help.
You mentioned test driven development. The Boost Unit Test Framework, for example, is powerful, but IMHO suffers from extremly bad documentation. That'd be a place to start, would teach you everything there is to know about that particular part of Boost, and I am sure you could find your way into one of the Boost modules from there.
I think you're going to have to be more specific. As a quick check, I did an apt-cache showpkg libstdc++6 on my Debian squeeze system, to find all the packages that depend on the C++ library — and found 4,537 of them. Obvious examples include:
most of KDE
Firefox, Thunderbird, etc.
apt-get itself
It'd really help if you specified what field you're interested in.
You can find many projects on GitHub. If you find a nice project, you can fork it (it's like creating a local copy you can work on) and start coding. Once you have done something nice, you can make a "Pull request" to ask the guy you made your fork from to merge your work.
I like being able to commit without having to ask for an access and be able to make smalls contributions to many projects without having to contact anybody, simply with a couple of clicks.
You can also check Gitorious and Bitbucket, both site work a bit like Github.

What tools exist for comparing C++ code to coding guidelines? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
There exist tools for comparing code against a custom specified set of coding guidelines/standards for a variety of languages (rather than pure static analysis for common defects). Examples include FxCop for .Net code and CheckStyle for Java, but I was wondering what examples people know of in the C++ world.
An existing question was asked regarding free tools which provided examples like Vera but I was also wondering about commercial tools that may be available.
A tool used by us was CodeWizard from Parasoft. But I think the new version is called "Parasoft C++ Test". From the homepage:
Static analysis of code for
compliance with user-selected coding
standards
Graphical RuleWizard
editor for creating custom coding
rules
Static code path simulation
for identifying potential runtime
errors
Automated code review with a
graphical interface and progress
tracking
Automated generation and
execution of unit and component-level
tests
Flexible stub framework
Full support for regression testing
Code coverage analysis with code
highlighting
Runtime memory error
checking during unit test execution
Full team deployment infrastructure
for desktop and command line usage
The full list that I managed to generate:
PRQA's QA C++
Parasoft's C++Test
MS Visual Studio Team System seems to have some functionality but it's hard to tell via their website.
GrammaTech CodeSonar
Coverity Extend
The last two provide some functionality but not particularly customisable ones:
Klocwork Insight
Rational PurifyPlus
DISCLAIMER: Working on this tool is my day job.
I'm obviously biased, but one of the main features of QA C++ is Coding Standard enforcement. For example we do JSF++ and MISRA C++ enforcement. You can read more about this here.
astyle is a common Unix tool that reformats source to a specified style. It supports most C-like languages. I know of no similar commercial tools.
I was also wondering about commercial tools that may be available.
Visual Studio Team System Edition 2005/2008 does have some such stuff. They also have a facility to enforce a set of rules on a whole team. Check it out.
I do not know whether you looking for a tool with built-in rules or want to validate against your custom rules. If it is the second, you may find it useful to implement searches for undesirable patterns based on regexp. Depending on your needs, Metrix++ http://metrixplusplus.sourceforge.net/ may offer helpful framework.

portable zip library for C/C++ (not an application) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want to be able to zip files from my non-gui C/C++ application, on several versions of Windows, Linux/Unix, and MacOS.
The user will compile and run using this app using Eclipse + makefile or VisualStudio. I don't want the user to have to install something separately, or have my makefile install executables.
Prefer open-source. I'm already looking at "Zip 3.0"...
Take a look at Libarchive. I spent a lot of time seeking for a cross-platform and LGPL licensed library with convenient interface. This the best of all I've seen. Very easy and powerful tool. Originally designed for Unix-like systems but there's also the Windows version.
I've had great results with miniz: https://code.google.com/p/miniz/
For a simple compression of strings in c++, I also really like Timo Bingmann's solution.
I'd recommend ZipLib https://bitbucket.org/wbenny/ziplib/wiki/Home
Personal reasons why I love this project:
built around c++11 stl streams (ex. decompresses into stl streams!)
lightweight (no dependencies other than zlib)
can be used on both windows & liunx
It took me a long time to find this project - hope this helps someone.
We've used zlib a couple times here. It's a fairly standard library that has implementations in most main languages.
How about this:
http://zziplib.sourceforge.net/
http://www.info-zip.org/UnZip.html
HTH
Others have mentioned zlib, which is nice and fairly easy.
The 7-Zip (LZMA) SDK is more complex but also has very nice compression rates.
Edit: Although still in development, with the release process and history over time, I would be hesitant to recommend this now.
ZLIB - the most portable library in the world. open source, very proven and reliable. The gold standard.
why use anything else?

A free tool to check C/C++ source code against a set of coding standards? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
It looks quite easy to find such a tool for Java (Checkstyle, JCSC), but I can't seem to find one for C/C++. I am not looking for a lint-like static code analyzer, I only would like to check against coding standards like variable naming, capitalization, spacing, identation, bracket placement, and so on.
The only tool I know is Vera. Haven't used it, though, so can't comment how viable it is. Demo looks promising.
Google c++lint from Google code style guide.
I'm sure this could help to some degree cxx checker. Also this tool seems to be pretty good KWStyle It's from Kitware, the guys who develop Cmake.
Not exactly what you ask for, but I've found it easier to just all agree on a coding standard astyle can generate and then automate the process.
Try nsiqcppstyle. It's a Python based coding style checker for C/C++. It's easy to extend to add your own rules.
There's a list. There is also a putative C++ frontend on splint.
I have used a tool in my work its LDRA tool suite
It is used for testing the c/c++ code but it also can check against coding standards such as MISRA etc.
Check universalindentgui on sourceforge.net.
it has many style checkers for C and you can customise the checkers.
There is cppcheck which is supported also by Hudson via the plugin of the same name.
Check Metrix++ http://metrixplusplus.sourceforge.net/. It may require some extensions which are specific for your needs.
Check out Abraxas Code Check
http://www.abxsoft.com/codchk_user.html
I'm currently working on a project with another project to write just such a tool. I looked at other static code analysis tools and decided that I could do better.
Unfortunately, the project is not yet ready to be used without fairly intimate knowledge of the code (read: it's buggy as all hell). However, we're moving fairly quickly, and hope to have a beta release within the next 8 weeks.
The project is open source - you can visit the project page, and if you want to get involved, we'd love some more external input.
I won't bore you with the details - you can visit the project page for that, but I will say one thing: Most static code analysis tools are aimed at checking your code for mistakes, and not very concerned with checking for coding guidelines. We have taken a more flexible approach that allows us to write plugiins to check for both "house rules" as well as possible bugs.
If you want any more information, please don't hesitate to contact me.
Cheers,