Skip to content

Commit

Permalink
linthub test
Browse files Browse the repository at this point in the history
  • Loading branch information
Anne Jan Brouwer committed Nov 23, 2015
1 parent 84f2856 commit 853272c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .linthub.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 8 additions & 4 deletions util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand All @@ -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);
Expand Down Expand Up @@ -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());
}


Expand Down

0 comments on commit 853272c

Please sign in to comment.