Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter markdownlint-cli2 test basic 1`] = `
{
"issues": [
{
"code": "error",
"column": "1",
"file": "test_data/basic.in.md",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#error",
"level": "LEVEL_HIGH",
"line": "3",
"linter": "markdownlint-cli2",
"message": "MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "This file fails some rules"]",
"targetType": "markdown",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "markdown",
"linter": "markdownlint-cli2",
"paths": [
"test_data/basic.in.md",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "markdown",
"linter": "markdownlint-cli2",
"paths": [
"test_data/basic.in.md",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;
50 changes: 50 additions & 0 deletions linters/ruff/test_data/ruff_nbqa_v0.14.13_basic_nb.check.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter ruff-nbqa test basic_nb 1`] = `
{
"issues": [
{
"code": "error",
"file": "test_data/basic_nb.in.ipynb",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"linter": "ruff-nbqa",
"message": "F401 [*] \`os\` imported but unused
--> /tmp/plugins_/test_data/basic_nb.in.ipynb:2:8
|
1 | # %%NBQA-CELL-SEP
2 | import os
| ^^
3 |
4 | print("Hello World!")
|
help: Remove unused import: \`os\`",
"targetType": "jupyter",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "jupyter",
"linter": "ruff-nbqa",
"paths": [
"test_data/basic_nb.in.ipynb",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "jupyter",
"linter": "ruff-nbqa",
"paths": [
"test_data/basic_nb.in.ipynb",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;
101 changes: 101 additions & 0 deletions linters/ruff/test_data/ruff_v0.14.13_basic.check.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter ruff test basic 1`] = `
{
"issues": [
{
"code": "E402",
"column": "1",
"file": "test_data/basic.in.py",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.astral.sh/ruff/rules/#E402",
"level": "LEVEL_HIGH",
"line": "7",
"linter": "ruff",
"message": "Module level import not at top of file",
"ranges": [
{
"filePath": "test_data/basic.in.py",
"length": "10",
"offset": "83",
},
],
"targetType": "python",
},
{
"autofixOptions": [
{
"message": "Remove unused import: \`sys\`",
"replacements": [
{
"filePath": "test_data/basic.in.py",
"length": "11",
"offset": "83",
},
],
},
],
"code": "F401",
"column": "8",
"file": "test_data/basic.in.py",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.astral.sh/ruff/rules/#F401",
"level": "LEVEL_HIGH",
"line": "7",
"linter": "ruff",
"message": "\`sys\` imported but unused",
"ranges": [
{
"filePath": "test_data/basic.in.py",
"length": "3",
"offset": "90",
},
],
"targetType": "python",
},
{
"code": "E402",
"column": "1",
"file": "test_data/basic.in.py",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.astral.sh/ruff/rules/#E402",
"level": "LEVEL_HIGH",
"line": "9",
"linter": "ruff",
"message": "Module level import not at top of file",
"ranges": [
{
"filePath": "test_data/basic.in.py",
"length": "11",
"offset": "120",
},
],
"targetType": "python",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "python",
"linter": "ruff",
"paths": [
"test_data/basic.in.py",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "python",
"linter": "ruff",
"paths": [
"test_data/basic.in.py",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;
55 changes: 55 additions & 0 deletions linters/ruff/test_data/ruff_v0.14.13_basic_nb.check.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter ruff test basic_nb 1`] = `
{
"issues": [
{
"autofixOptions": [
{
"message": "Remove unused import: \`os\`",
"replacements": [
{
"filePath": "test_data/basic_nb.in.ipynb",
"length": "2",
},
],
},
],
"code": "F401",
"column": "1",
"file": "test_data/basic_nb.in.ipynb",
"issueClass": "ISSUE_CLASS_EXISTING",
"issueUrl": "https://docs.astral.sh/ruff/rules/#F401",
"level": "LEVEL_HIGH",
"line": "1",
"linter": "ruff",
"message": "\`os\` imported but unused",
"targetType": "jupyter",
},
],
"lintActions": [
{
"command": "lint",
"fileGroupName": "jupyter",
"linter": "ruff",
"paths": [
"test_data/basic_nb.in.ipynb",
],
"verb": "TRUNK_VERB_CHECK",
},
{
"command": "lint",
"fileGroupName": "jupyter",
"linter": "ruff",
"paths": [
"test_data/basic_nb.in.ipynb",
],
"upstream": true,
"verb": "TRUNK_VERB_CHECK",
},
],
"taskFailures": [],
"unformattedFiles": [],
}
`;
14 changes: 14 additions & 0 deletions linters/ruff/test_data/ruff_v0.14.13_format.fmt.shot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing formatter ruff test format 1`] = `
"# whitespace below vvv

# A malindented comment
if __name__ == "__main__":
a = 4 + 1
b = 2 * 7
c = [1, 2, 3]
print(a / b)
"
`;
Loading
Loading