Skip to content

Commit

Permalink
added MSVC /analyze for VS 2017 - relates #66
Browse files Browse the repository at this point in the history
  • Loading branch information
onqtam committed May 15, 2017
1 parent f1477ab commit 7937d52
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
6 changes: 6 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,9 @@ build_script:
- msbuild doctest.sln /p:Configuration=Release;Platform=Win32 /maxcpucount
- ctest -C Release --output-on-failure
- cd ..
# static code analysis
- IF "%gen%" == "Visual Studio 15 2017" mkdir analysis
- IF "%gen%" == "Visual Studio 15 2017" cd analysis
- IF "%gen%" == "Visual Studio 15 2017" cmake .. -G "%gen% Win64"
- IF "%gen%" == "Visual Studio 15 2017" msbuild doctest.sln /p:Configuration=Debug;Platform=x64 /maxcpucount /p:RunCodeAnalysis=true /p:CodeAnalysisTreatWarningsAsErrors=true
- IF "%gen%" == "Visual Studio 15 2017" cd ..
9 changes: 7 additions & 2 deletions doc/markdown/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Planned features for future releases - order changes constantly...

### For 1.2:

- integrate static analysis on the CI: **msvc**, **clang**, **cppcheck**
- integrate static analysis on the CI: **clang**
- decorators for test cases - like in boost test
- depends_on (decorator)
- description (decorator)
Expand Down Expand Up @@ -41,6 +41,7 @@ Planned features for future releases - order changes constantly...
test.cpp(45): Test case "test4" is skipped because test2 and test3 failed
Leaving test module "decorator_08"; testing time: 16ms
- runtime performance
- move string implementation to the fwd part - use new/delete
- lazily stringify expressions - only when needed
- optimize createStream/freeStream to reuse a pool of ostringstream objects
- get rid of local statics on the hot path - like in getContextState()
Expand Down Expand Up @@ -70,7 +71,9 @@ Planned features for future releases - order changes constantly...
- using cmake directly
- using it as a package (the install target)
- getting it from vcpkg/hunter/etc.
- address the coverage issue... look at how this project does it: https://github.com/rollbear/trompeloeil
- address the coverage issue... look at how these projects do it:
- https://github.com/rollbear/trompeloeil
- https://github.com/vietjtnguyen/argagg/blob/master/.travis.yml
- builds with GCC 7 when it is released (should be in late April)

### For 1.3:
Expand Down Expand Up @@ -133,6 +136,8 @@ Planned features for future releases - order changes constantly...

### Things that are being considered but not part of the roadmap yet:

- rpm package? like this: https://github.com/vietjtnguyen/argagg/blob/master/packaging/rpm/argagg.spec
- get the current test case/section path - https://github.com/philsquared/Catch/issues/522
- when no assertion is encountered in a test case it should fail
- failure reporting should print out previous SECTIONs for data-driven testing - as requested [here](https://github.com/philsquared/Catch/issues/734)
- ```Bitwise()``` class that has overloaded operators for comparison - to be used to check objects bitwise against each other
Expand Down
10 changes: 10 additions & 0 deletions doctest/doctest.h
Original file line number Diff line number Diff line change
Expand Up @@ -3202,6 +3202,12 @@ namespace detail
#endif // DOCTEST_CONFIG_DISABLE
} // namespace detail

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 6011) // Dereferencing NULL pointer
#pragma warning(disable : 6387) // This does not adhere to the specification for the function strcpy
#endif // _MSC_VER

String::String(const char* in)
: m_str(static_cast<char*>(std::malloc(detail::my_strlen(in) + 1))) {
if(in)
Expand Down Expand Up @@ -3245,6 +3251,10 @@ String& String::operator+=(const String& other) {
return *this;
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif // _MSC_VER

unsigned String::size() const { return m_str ? detail::my_strlen(m_str) : 0; }
unsigned String::length() const { return size(); }

Expand Down
10 changes: 10 additions & 0 deletions doctest/parts/doctest_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ namespace detail
#endif // DOCTEST_CONFIG_DISABLE
} // namespace detail

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 6011) // Dereferencing NULL pointer
#pragma warning(disable : 6387) // This does not adhere to the specification for the function strcpy
#endif // _MSC_VER

String::String(const char* in)
: m_str(static_cast<char*>(std::malloc(detail::my_strlen(in) + 1))) {
if(in)
Expand Down Expand Up @@ -364,6 +370,10 @@ String& String::operator+=(const String& other) {
return *this;
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif // _MSC_VER

unsigned String::size() const { return m_str ? detail::my_strlen(m_str) : 0; }
unsigned String::length() const { return size(); }

Expand Down

0 comments on commit 7937d52

Please sign in to comment.