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

Remove extra directory in packages #22

Merged
merged 3 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ which are pointed to the corresponding vulnerabilities in target files.

* A `fix object` represents a proposed fix for the problem, indicated by tool.\
It specifies a set of artifacts to modify. For each artifact, it specifies regions to remove, and provides new content to insert.
* `Fix-Patches`, in its turn will parse such sections, create copy of target files, which are presented in `SARIF`,
* `Fix-Patches`, in its turn, will parse such sections, create copy of target files, which are presented in `SARIF`,
and automatically apply fixes to these copies.

The result output will contain the list of paths to the copies of provided target files with applied fixes.
Expand All @@ -32,7 +32,8 @@ The result output will contain the list of paths to the copies of provided targe
#### How to use:

Library provides easy-to-use API for fix patches applying, it's just need to provide
the path to `SARIF` file with expected fixes and the list of paths to target files which are presented in `SARIF`.
the path to `SARIF` file, which contain the list of fixes (`fix objects`) for target files and the list of paths to these files,
in the manner, in which they are presented in `SARIF` (via absolute/relative paths).

```kotlin
val processedFiles: List<Path> = SarifFixAdapter(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.saveourtool.sarifutils.cli.adapter
package com.saveourtool.sarifutils.adapter

import com.saveourtool.sarifutils.cli.config.FileReplacements
import com.saveourtool.sarifutils.cli.config.RuleReplacements
import com.saveourtool.sarifutils.cli.files.createTempDir
import com.saveourtool.sarifutils.cli.files.fs
import com.saveourtool.sarifutils.cli.files.readFile
import com.saveourtool.sarifutils.cli.files.readLines
import com.saveourtool.sarifutils.cli.files.writeContentWithNewLinesToFile
import com.saveourtool.sarifutils.cli.utils.adaptedIsAbsolute
import com.saveourtool.sarifutils.cli.utils.getUriBaseIdForArtifactLocation
import com.saveourtool.sarifutils.cli.utils.resolveUriBaseId
import com.saveourtool.sarifutils.config.FileReplacements
import com.saveourtool.sarifutils.config.RuleReplacements
import com.saveourtool.sarifutils.files.createTempDir
import com.saveourtool.sarifutils.files.fs
import com.saveourtool.sarifutils.files.readFile
import com.saveourtool.sarifutils.files.readLines
import com.saveourtool.sarifutils.files.writeContentWithNewLinesToFile
import com.saveourtool.sarifutils.utils.adaptedIsAbsolute
import com.saveourtool.sarifutils.utils.getUriBaseIdForArtifactLocation
import com.saveourtool.sarifutils.utils.resolveUriBaseId
import io.github.detekt.sarif4k.Replacement

import io.github.detekt.sarif4k.Run
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.saveourtool.sarifutils.cli.config
package com.saveourtool.sarifutils.config

import io.github.detekt.sarif4k.Replacement
import okio.Path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Utility methods to work with file system
*/

package com.saveourtool.sarifutils.cli.files
package com.saveourtool.sarifutils.files

import okio.FileSystem
import okio.Path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Utility methods to work with SARIF files.
*/

package com.saveourtool.sarifutils.cli.utils
package com.saveourtool.sarifutils.utils

import io.github.detekt.sarif4k.ArtifactLocation
import io.github.detekt.sarif4k.Result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

package com.saveourtool.sarifutils.adapter

import com.saveourtool.sarifutils.cli.adapter.SarifFixAdapter
import com.saveourtool.sarifutils.cli.files.readFile
import com.saveourtool.sarifutils.cli.files.readLines
import com.saveourtool.sarifutils.files.readFile
import com.saveourtool.sarifutils.files.readLines

import io.github.detekt.sarif4k.Replacement
import io.github.detekt.sarif4k.SarifSchema210
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.saveourtool.sarifutils.utils

import com.saveourtool.sarifutils.cli.utils.getUriBaseIdForArtifactLocation
import com.saveourtool.sarifutils.cli.utils.resolveUriBaseId

import io.github.detekt.sarif4k.SarifSchema210
import okio.Path
import okio.Path.Companion.toPath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@file:JvmName("FileUtilsJvm")

package com.saveourtool.sarifutils.cli.files
package com.saveourtool.sarifutils.files

import okio.FileSystem

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Utility methods to work with file system
*/

package com.saveourtool.sarifutils.cli.files
package com.saveourtool.sarifutils.files

import okio.FileSystem

Expand Down