Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qodana #5

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
99e2a24
Qodana initial commit
Mar 5, 2022
5e51d13
Set theme jekyll-theme-cayman
barnhill Mar 5, 2022
525e59d
add badge
Mar 5, 2022
62102eb
publish qodana report
Mar 5, 2022
e4c0729
fix publishing of qodana report
Mar 5, 2022
d8871a7
new folder for qodana report
Mar 5, 2022
2630e8b
fix Qodana schedule
Mar 5, 2022
45be9d0
Merge branch 'master' of github.com:barnhill/SaveStateObserver into q…
Jul 7, 2023
e466235
add env vars to qodana build
Jul 8, 2023
f1837cc
use build environment for qodana scan
Jul 8, 2023
9bb20e1
allow for null remote cache variables
Jul 8, 2023
3602dff
dont use string interpolation when reading the cache url
Jul 8, 2023
f4b4ebe
check for env variables before configuring build cache
Jul 8, 2023
c4ed82d
use latest qodana
Jul 8, 2023
e0522f0
upload sarif file use with github code scanning
Jul 8, 2023
fdbf626
android linter
Jul 9, 2023
3b77d44
depth of 0 for checkout
Jul 9, 2023
26b4fb7
combine jobs
Jul 9, 2023
f3bcb24
add env vars
Jul 9, 2023
0bfd768
attempt fix
Jul 9, 2023
b233c9b
attempt fix
Jul 9, 2023
d21fd53
pass env vars to container
Jul 9, 2023
18cfbf0
create lint warning to test qodana
Jul 9, 2023
be20231
use latest qodana action
Jul 9, 2023
f2c61b7
move fetch depth to checkout action
Jul 9, 2023
ba08ee4
use specific qodana version
Jul 9, 2023
99ec84f
qodana token
Jul 9, 2023
e6d8567
dont specify fetch depth
Jul 9, 2023
70d7004
2023.1.0
Jul 9, 2023
f6f215a
fetch depth 0
Jul 9, 2023
f0972bf
introduce lint issue to test qodana
Jul 9, 2023
f774493
remove fetch depth
Jul 9, 2023
f967114
use latest action
Jul 9, 2023
18957ac
project jdk
Jul 9, 2023
7e0036f
jvm community linter
Jul 9, 2023
f9e5b3a
Revert "use latest action"
Jul 9, 2023
f4402a3
introduce new lint warning for testing
Jul 9, 2023
3be6016
remove lint warning
Jul 9, 2023
7b75d24
use android linter
Jul 9, 2023
18b239f
linter change
Jul 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,25 @@ jobs:
with:
name: Package
path: build/libs

qodana:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
environment: build
steps:
- uses: actions/checkout@v3
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
args: -e,REMOTE_CACHE_URL=${{ secrets.REMOTE_CACHE_URL }},-e,REMOTE_CACHE_USER=${{ secrets.REMOTE_CACHE_USER }},-e,REMOTE_CACHE_PASS=${{ secrets.REMOTE_CACHE_PASS }}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ runner.temp }}/qodana/results/report
destination_dir: ./qodana
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
5 changes: 5 additions & 0 deletions qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "1.0"
linter: jetbrains/qodana-jvm-community:2023.1
projectJDK: corretto-17
profile:
name: qodana.recommended
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.pnuema.android.savestateobserver

import java.util.*
import javax.crypto.Cipher

/**
* Handles registration of workers to be notified should an oversize bundle be detected.
Expand Down
2 changes: 2 additions & 0 deletions savestateobserver/src/qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version: "1.0"
linter: jetbrains/qodana-jvm-android:2023.1-eap
41 changes: 23 additions & 18 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,33 @@ gradleEnterprise {
}
}

def cacheUrl = System.getenv("REMOTE_CACHE_URL") == null ? settings["REMOTE_CACHE_URL"] : "${System.getenv("REMOTE_CACHE_URL")}"
// Configure Remote Build Cache
if (settings.hasProperty("REMOTE_CACHE_URL") || System.hasProperty("REMOTE_CACHE_URL")) {
def cacheUrl = (System.getenv("REMOTE_CACHE_URL") == null ? settings["REMOTE_CACHE_URL"] : $ { System.getenv("REMOTE_CACHE_URL") }) ?: null

if (cacheUrl != null) {
buildCache {
local {
removeUnusedEntriesAfterDays = 30
}

remote(HttpBuildCache) {
url = cacheUrl
enabled = true
push = true
allowUntrustedServer = true
allowInsecureProtocol = false
if (enabled) {
println "Using remote build cache: " + cacheUrl
if (cacheUrl != null) {
buildCache {
local {
removeUnusedEntriesAfterDays = 30
}
credentials {
username = System.getenv("REMOTE_CACHE_USER") == null ? settings['REMOTE_CACHE_USER'] : "${System.getenv("REMOTE_CACHE_USER")}"
password = System.getenv("REMOTE_CACHE_PASS") == null ? settings['REMOTE_CACHE_PASS'] : "${System.getenv("REMOTE_CACHE_PASS")}"

remote(HttpBuildCache) {
url = cacheUrl
enabled = true
push = true
allowUntrustedServer = true
allowInsecureProtocol = false
if (enabled) {
println "Using remote build cache: " + cacheUrl
}
credentials {
username = System.getenv("REMOTE_CACHE_USER") == null ? settings['REMOTE_CACHE_USER'] : "${System.getenv("REMOTE_CACHE_USER")}"
password = System.getenv("REMOTE_CACHE_PASS") == null ? settings['REMOTE_CACHE_PASS'] : "${System.getenv("REMOTE_CACHE_PASS")}"
}
}
}
} else {
println "Not using remote build cache!"
}
} else {
println "Not using remote build cache!"
Expand Down