forked from joernio/joern
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update scalafmt-core to 3.4.3 (joernio#1015)
- Loading branch information
1 parent
9b8d225
commit 93157c8
Showing
11 changed files
with
45 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 3.4.2 | ||
version = 3.4.3 | ||
runner.dialect = scala213 | ||
preset = IntelliJ | ||
maxColumn = 120 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
def instrBefore(x : CfgNode, n: Int) = | ||
x.cfgPrev(n).l.reverse.map(y => y.address.get + ": " + y.code) | ||
def instrBefore(x: CfgNode, n: Int) = | ||
x.cfgPrev(n).l.reverse.map(y => y.address.get + ": " + y.code) | ||
|
||
cpg.ret.map(x => instrBefore(x, 5).mkString("|\t") + "\n").l |> "/tmp/gadgets.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
@main def main(inputPath: String, | ||
minMethodCount: Int, | ||
expectedMethod: String, | ||
frontend: String) = { | ||
@main def main(inputPath: String, minMethodCount: Int, expectedMethod: String, frontend: String) = { | ||
importCode(inputPath, language = frontend.toUpperCase) | ||
val methodCount = cpg.method.size | ||
assert(methodCount >= minMethodCount, | ||
s"expected at least $minMethodCount methods, but only found $methodCount") | ||
assert(methodCount >= minMethodCount, s"expected at least $minMethodCount methods, but only found $methodCount") | ||
|
||
val methodNames = cpg.method.name.toSet | ||
assert(methodNames.contains(expectedMethod), s"expected method `$expectedMethod` not found... available methods: $methodNames") | ||
assert( | ||
methodNames.contains(expectedMethod), | ||
s"expected method `$expectedMethod` not found... available methods: $methodNames" | ||
) | ||
} | ||
|