diff options
author | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-11-23 23:28:59 +0100 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-11-23 23:28:59 +0100 |
commit | 853272c88787a06755c89f45f96de5026bb18537 (patch) | |
tree | fd8317c38fb9c8adfb37d73a47709e8cfbc131f8 | |
parent | 84f2856455a1cd03a2cbff97e4dbe840f7883bd5 (diff) |
linthub test
-rw-r--r-- | .linthub.yml | 12 | ||||
-rw-r--r-- | util.cpp | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/.linthub.yml b/.linthub.yml new file mode 100644 index 00000000..0866734a --- /dev/null +++ b/.linthub.yml @@ -0,0 +1,12 @@ +platform: linux | osx +build: +- qmake +- make +analyzers: + - cpplint: true + include: ["*.cpp", "*.h", "*.hpp", "*.c"] + path: . + filters: + - -whitespace + - +whitespace/braces + style: google @@ -22,7 +22,8 @@ void Util::initialiseEnvironment() // TODO checks here QString path = _env.value("PATH"); - if (!path.contains("/usr/local/MacGPG2/bin") && QFile("/usr/local/MacGPG2/bin").exists()) { + if (!path.contains("/usr/local/MacGPG2/bin") + && QFile("/usr/local/MacGPG2/bin").exists()) { path += ":/usr/local/MacGPG2/bin"; } if (!path.contains("/usr/local/bin")) { @@ -46,9 +47,11 @@ QString Util::findPasswordStore() path = _env.value("PASSWORD_STORE_DIR"); } else { #ifdef Q_OS_WIN - path = QDir::homePath() + QDir::separator() + "password-store" + QDir::separator(); + path = QDir::homePath() + QDir::separator() + + "password-store" + QDir::separator(); #else - path = QDir::homePath() + QDir::separator() + ".password-store" + QDir::separator(); + path = QDir::homePath() + QDir::separator() + + ".password-store" + QDir::separator(); #endif } return Util::normalizeFolderPath(path); @@ -117,7 +120,8 @@ QString Util::findBinaryInPath(QString binary) */ bool Util::checkConfig(QString passStore, QString passExecutable, QString gpgExecutable) { - return !QFile(passStore + ".gpg-id").exists() || (!QFile(passExecutable).exists() && !QFile(gpgExecutable).exists()); + return !QFile(passStore + ".gpg-id").exists() + || (!QFile(passExecutable).exists() && !QFile(gpgExecutable).exists()); } |