Commit 9a32bd35 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Enable clazy raw-environment-function

parent dcf8f794
......@@ -48,7 +48,7 @@ build_clazy_clang_tidy:
script:
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir && cat compile_commands.json | jq '[.[] | select(.file | contains("'"$srcdir"'"))]' > compile_commands.aux.json && cat compile_commands.aux.json | jq '[.[] | select(.file | contains("/synctex/")| not)]' > compile_commands.json
- CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-qstring-allocations,isempty-vs-count,qhash-with-char-pointer-key" ninja
- CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-qstring-allocations,isempty-vs-count,qhash-with-char-pointer-key,raw-environment-function" ninja
# Fix the poppler header, remove when debian:unstable ships poppler 0.82 or later
- sed -i "N;N;N;N; s#class MediaRendition\;\nclass MovieAnnotation\;\nclass ScreenAnnotation;#class MediaRendition\;#g" /usr/include/poppler/qt5/poppler-link.h
- "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-loop-convert,modernize-use-nullptr,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config=\"{WarningsAsErrors: '*'}\""
......@@ -42,7 +42,7 @@ static const char * URL_SCHEME_CHM = "ms-its";
EBook_CHM::EBook_CHM()
: EBook()
{
m_envOptions = getenv("KCHMVIEWEROPTS");
m_envOptions = qgetenv("KCHMVIEWEROPTS");
m_chmFile = nullptr;
m_filename = m_font = QString();
......
......@@ -269,7 +269,7 @@ static void InitializeConfigInfo ()
const char *config_dir = STRINGIFY (PLUCKER_CONFIG_DIR);
const char *system_config_file_name = STRINGIFY (SYS_CONFIG_FILE_NAME);
const char *user_config_filename = STRINGIFY (USER_CONFIG_FILE_NAME);
char *home = getenv ("HOME");
char *home = getenv ("HOME"); //clazy:exclude=raw-environment-function
TryReadConfigFile (config_dir, system_config_file_name);
if (home != nullptr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment