Skip to content

Commit

Permalink
Created new coverity/codecov/lint environment for sexpp project, fixe…
Browse files Browse the repository at this point in the history
…d coverity CID 453360
  • Loading branch information
maxirmx committed Jun 26, 2023
1 parent 5ae8646 commit 7e4f9a8
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
env:
CC: gcc
CXX: g++
COVERITY_TOKEN: qjcM1CWLcq9PJB3yL0ZXIw
MAKEFLAGS: j4
TOKEN: qjcM1CWLcq9PJB3yL0ZXIw
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -56,8 +56,6 @@ jobs:
run: cmake -Bbuild -DDOWNLOAD_GTEST=OFF

- name: Download Coverity
env:
TOKEN: AK2euT-neBcvZB1g_m3pbg
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=$GITHUB_REPOSITORY" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
Expand All @@ -70,8 +68,6 @@ jobs:
cov-build --dir cov-int cmake --build build
- name: Submit
env:
TOKEN: AK2euT-neBcvZB1g_m3pbg
run: |
tar czvf results.tgz cov-int
curl \
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
source: '.'
extensions: 'h,cpp,c'
clangFormatVersion: 11
inplace: True
- uses: EndBug/add-and-commit@v9
with:
author_name: A robot on behalf of Maxim Samsonov
author_email: [email protected]
message: 'Committing clang-format changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# inplace: True
# - uses: EndBug/add-and-commit@v9
# with:
# author_name: A robot on behalf of Maxim Samsonov
# author_email: [email protected]
# message: 'Committing clang-format changes'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shellcheck:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ image:https://github.com/rnpgp/sexp/workflows/build-and-test-deb/badge.svg["Buil
image:https://github.com/rnpgp/sexp/workflows/build-and-test-msys/badge.svg["Build status MSys", link="https://github.com/rnpgp/sexp/actions?workflow=build-and-test-msys"]


image:https://codecov.io/gh/rnpgp/sexp/branch/feat/g23/graph/badge.svg["Code coverage", link="https://codecov.io/gh/rnpgp/sexpp"]
image:https://github.com/rnpgp/sexp/workflows/CodeQL/badge.svg["CodeQL analysis", link="https://github.com/rnpgp/sexp/actions?workflow=CodeQL"]
image:https://codecov.io/gh/rnpgp/sexpp/branch/main/graph/badge.svg["Code coverage", link="https://codecov.io/gh/rnpgp/sexpp"]
image:https://github.com/rnpgp/sexpp/workflows/CodeQL/badge.svg["CodeQL analysis", link="https://github.com/rnpgp/sexpp/actions?workflow=CodeQL"]
image:https://scan.coverity.com/projects/28717/badge.svg["Coverity Scan Build Status", link="https://scan.coverity.com/projects/rnpgp-sexpp"]


Expand Down
2 changes: 1 addition & 1 deletion include/sexpp/ext-key-format.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace ext_key_format {

void ext_key_error(
void ext_key_error(
sexp::sexp_exception_t::severity level, const char *msg, size_t c1, size_t c2, int pos);

class ext_key_input_stream_t;
Expand Down
4 changes: 2 additions & 2 deletions include/sexpp/sexp-error.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class sexp_exception_t : public std::exception {
int error_position,
const char *prefix = "SEXP")
: position{error_position}, level{error_level},
message{format(prefix, error_message, error_level, error_position)} {};
message{format(prefix, std::move(error_message), error_level, error_position)} {};

static std::string format(std::string prf,
std::string message,
Expand All @@ -65,7 +65,7 @@ class sexp_exception_t : public std::exception {
static void set_interactive(bool new_interactive) { interactive = new_interactive; };
};

void sexp_error(
void sexp_error(
sexp_exception_t::severity level, const char *msg, size_t c1, size_t c2, int pos);

} // namespace sexp
8 changes: 4 additions & 4 deletions include/sexpp/sexp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace sexp {
* However, we do enforce 'C' locale this way
*/

class sexp_char_defs_t {
class sexp_char_defs_t {
protected:
static const bool base64digit[256]; /* true if c is base64 digit */
static const bool tokenchar[256]; /* true if c can be in a token */
Expand Down Expand Up @@ -100,7 +100,7 @@ class sexp_input_stream_t;

typedef uint8_t octet_t;

class sexp_simple_string_t : public std::basic_string<octet_t>, private sexp_char_defs_t {
class sexp_simple_string_t : public std::basic_string<octet_t>, private sexp_char_defs_t {
public:
sexp_simple_string_t(void) = default;
sexp_simple_string_t(const octet_t *dt) : std::basic_string<octet_t>{dt} {}
Expand Down Expand Up @@ -161,7 +161,7 @@ inline bool operator!=(const sexp_simple_string_t *left, const std::string &righ
* SEXP object
*/

class sexp_object_t {
class sexp_object_t {
public:
virtual ~sexp_object_t(){};

Expand Down Expand Up @@ -201,7 +201,7 @@ class sexp_object_t {
* SEXP string
*/

class sexp_string_t : public sexp_object_t {
class sexp_string_t : public sexp_object_t {
protected:
bool with_presentation_hint;
sexp_simple_string_t presentation_hint;
Expand Down

0 comments on commit 7e4f9a8

Please sign in to comment.