Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 65a5af2e31 |
@@ -24,7 +24,7 @@ class StaticAnalysisAndroidPlugin : StaticAnalysisPlugin() {
|
||||
project.tasks.register("staticAnalysis") {
|
||||
setupStaticAnalysisTask(
|
||||
linters = linters,
|
||||
buildVariant = applicationVariants.first { it.name.contains("debug") }.name
|
||||
buildVariant = applicationVariants.first { it.name.contains("Debug") }.name
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -33,9 +33,9 @@ class StaticAnalysisAndroidPlugin : StaticAnalysisPlugin() {
|
||||
}
|
||||
|
||||
override fun createLinters(): List<Linter> = listOf(
|
||||
DetektLinter()
|
||||
// CpdLinter() todo return after fixing all problems
|
||||
// AndroidLinter() todo temporary disable to avoid FileNotFoundException when generating report
|
||||
DetektLinter(),
|
||||
CpdLinter(),
|
||||
AndroidLinter()
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ private def generate(Map<String, String> sources, Project project) {
|
||||
xml.resources() {
|
||||
json.each {
|
||||
k, v ->
|
||||
string(name: "${k}", formatted: "false", "${v}".replace('\n', '\\n').replace('\"', '\\"'))
|
||||
string(name: "${k}", formatted: "false", "${v}".replace('\n', '\\n'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,12 +76,12 @@ get_api_spec_current_commit()
|
||||
{
|
||||
if [ -z "${API_SPEC_DIR}" ]; then
|
||||
if [ ! -z "${1}" ]; then
|
||||
echo `git rev-parse HEAD:${1}`
|
||||
echo `git -C ${1} rev-parse --verify HEAD`
|
||||
else
|
||||
echo `git rev-parse HEAD`
|
||||
echo `git rev-parse --verify HEAD`
|
||||
fi
|
||||
else
|
||||
echo `git rev-parse HEAD:${API_SPEC_DIR}`
|
||||
echo `git -C ${API_SPEC_DIR} rev-parse --verify HEAD`
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ is_nothing_changed_since_last_check()
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ is_api_spec_under_source_control == "true" ]; then
|
||||
if [ `is_api_spec_under_source_control` == "true" ]; then
|
||||
local -r CURRENT_COMMIT=`get_api_spec_current_commit`
|
||||
|
||||
local -r LAST_CHECKED_COMMIT=`cat ${COMMIT_FILE_PATH} 2> /dev/null || echo ""`
|
||||
|
||||
Reference in New Issue
Block a user