From 65d7f0b5bf737ba55279528fd934663cd148d137 Mon Sep 17 00:00:00 2001 From: TylerJang27 <42743566+TylerJang27@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:32:48 +0000 Subject: [PATCH] Auto add snapshots --- .../test_data/scalafmt_v3.9.1_basic.fmt.shot | 7 +++++ .../scalafmt_v3.9.1_empty.check.shot | 31 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot create mode 100644 linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot diff --git a/linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot b/linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot new file mode 100644 index 000000000..1816be293 --- /dev/null +++ b/linters/scalafmt/test_data/scalafmt_v3.9.1_basic.fmt.shot @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing formatter scalafmt test basic 1`] = ` +"case class Demo(a: String, b: Int, c: Char) +" +`; diff --git a/linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot b/linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot new file mode 100644 index 000000000..180d1aacc --- /dev/null +++ b/linters/scalafmt/test_data/scalafmt_v3.9.1_empty.check.shot @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP +// trunk-upgrade-validation:RELEASE + +exports[`Testing linter scalafmt test empty 1`] = ` +{ + "issues": [], + "lintActions": [ + { + "command": "format", + "fileGroupName": "scala", + "linter": "scalafmt", + "paths": [ + "test_data/empty.in.scala", + ], + "verb": "TRUNK_VERB_FMT", + }, + ], + "taskFailures": [], + "unformattedFiles": [ + { + "column": "1", + "file": "test_data/empty.in.scala", + "issueClass": "ISSUE_CLASS_UNFORMATTED", + "level": "LEVEL_HIGH", + "line": "1", + "linter": "scalafmt", + "message": "Incorrect formatting, autoformat by running 'trunk fmt'", + }, + ], +} +`;