Skip to content

Commit

Permalink
Adjused package path
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Jan 20, 2025
1 parent 9ccbcfa commit 57c65e3
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 50 deletions.
44 changes: 0 additions & 44 deletions codyze-compliance/src/integrationTest/kotlin/CommandTest.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright (c) 2025, Fraunhofer AISEC. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $$$$$$\ $$$$$$$\ $$$$$$\
* $$ __$$\ $$ __$$\ $$ __$$\
* $$ / \__|$$ | $$ |$$ / \__|
* $$ | $$$$$$$ |$$ |$$$$\
* $$ | $$ ____/ $$ |\_$$ |
* $$ | $$\ $$ | $$ | $$ |
* \$$$$$ |$$ | \$$$$$ |
* \______/ \__| \______/
*
*/
package de.fraunhofer.aisec.codyze.compliance /*
* Copyright (c) 2025, Fraunhofer AISEC. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $$$$$$\ $$$$$$$\ $$$$$$\
* $$ __$$\ $$ __$$\ $$ __$$\
* $$ / \__|$$ | $$ |$$ / \__|
* $$ | $$$$$$$ |$$ |$$$$\
* $$ | $$ ____/ $$ |\_$$ |
* $$ | $$\ $$ | $$ | $$ |
* \$$$$$ |$$ | \$$$$$ |
* \______/ \__| \______/
*
*/

import com.github.ajalt.clikt.testing.test
import kotlin.test.Test
import kotlin.test.assertEquals

class CommandIntegrationTest {
@Test
fun testScanCommand() {
val command = ScanCommand()
val result =
command.test(
"--project-dir src/integrationTest/resources/demo-app --sources src/integrationTest/resources/demo-app/main.py"
)
assertEquals(
"Message(arguments=null, id=null, markdown=This is a **finding**, properties=null, text=null)\n",
result.output,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* \______/ \__| \______/
*
*/
package de.fraunhofer.aisec.cpg.codyze.compliance
package de.fraunhofer.aisec.codyze.compliance

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.subcommands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* \______/ \__| \______/
*
*/
package de.fraunhofer.aisec.cpg.codyze.compliance
package de.fraunhofer.aisec.codyze.compliance

import com.charleskorn.kaml.Yaml
import com.charleskorn.kaml.decodeFromStream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* \______/ \__| \______/
*
*/
package de.fraunhofer.aisec.cpg.codyze.compliance
package de.fraunhofer.aisec.codyze.compliance

import com.github.ajalt.clikt.testing.test
import kotlin.test.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* \______/ \__| \______/
*
*/
package de.fraunhofer.aisec.cpg.codyze.compliance
package de.fraunhofer.aisec.codyze.compliance

import de.fraunhofer.aisec.cpg.ScopeManager
import de.fraunhofer.aisec.cpg.TranslationConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
* \______/ \__| \______/
*
*/
package de.fraunhofer.aisec.cpg.codyze
package de.fraunhofer.aisec.codyze

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.main
import com.github.ajalt.clikt.core.subcommands
import de.fraunhofer.aisec.codyze.compliance.Command

class Codyze : CliktCommand() {
override fun run() {}
}

fun main(args: Array<String>) {
Codyze().subcommands(de.fraunhofer.aisec.cpg.codyze.compliance.Command).main(args)
Codyze().subcommands(Command).main(args)

Check warning on line 38 in codyze/src/main/kotlin/de/fraunhofer/aisec/codyze/Application.kt

View check run for this annotation

Codecov / codecov/patch

codyze/src/main/kotlin/de/fraunhofer/aisec/codyze/Application.kt#L38

Added line #L38 was not covered by tests
}

0 comments on commit 57c65e3

Please sign in to comment.