Better, faster typo checker (#6716)
* Fix typo 'horizonal' * Fix typos * Fix more typos * Fix more typos * Update CI action * Fix typos * Update src/lang/queryAst.test.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Update src/lang/queryAst.test.ts Co-authored-by: Jonathan Tran <jonnytran@gmail.com> * Update typos * Update snap --------- Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
This commit is contained in:
@ -489,7 +489,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
|
||||
// Changing the edge visibility settings with the exact same file should NOT bust the cache.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_but_different_edge_visiblity_setting() {
|
||||
async fn test_get_changed_program_same_code_but_different_edge_visibility_setting() {
|
||||
let new = r#"// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|
||||
@ -2571,17 +2571,17 @@ a = foo()
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn load_all_modules() {
|
||||
// program a.kcl
|
||||
let programa_kcl = r#"
|
||||
let program_a_kcl = r#"
|
||||
export a = 1
|
||||
"#;
|
||||
// program b.kcl
|
||||
let programb_kcl = r#"
|
||||
let program_b_kcl = r#"
|
||||
import a from 'a.kcl'
|
||||
|
||||
export b = a + 1
|
||||
"#;
|
||||
// program c.kcl
|
||||
let programc_kcl = r#"
|
||||
let program_c_kcl = r#"
|
||||
import a from 'a.kcl'
|
||||
|
||||
export c = a + 2
|
||||
@ -2611,21 +2611,21 @@ d = b + c
|
||||
tokio::fs::File::create(tmpdir.path().join("a.kcl"))
|
||||
.await
|
||||
.unwrap()
|
||||
.write_all(programa_kcl.as_bytes())
|
||||
.write_all(program_a_kcl.as_bytes())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
tokio::fs::File::create(tmpdir.path().join("b.kcl"))
|
||||
.await
|
||||
.unwrap()
|
||||
.write_all(programb_kcl.as_bytes())
|
||||
.write_all(program_b_kcl.as_bytes())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
tokio::fs::File::create(tmpdir.path().join("c.kcl"))
|
||||
.await
|
||||
.unwrap()
|
||||
.write_all(programc_kcl.as_bytes())
|
||||
.write_all(program_c_kcl.as_bytes())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
@ -1,156 +0,0 @@
|
||||
---
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 1,
|
||||
"declaration": {
|
||||
"commentStart": 1,
|
||||
"end": 126,
|
||||
"id": {
|
||||
"commentStart": 1,
|
||||
"end": 10,
|
||||
"name": "sketch001",
|
||||
"start": 1,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"body": [
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 27,
|
||||
"end": 31,
|
||||
"raw": "'XY'",
|
||||
"start": 27,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 13,
|
||||
"end": 26,
|
||||
"name": {
|
||||
"commentStart": 13,
|
||||
"end": 26,
|
||||
"name": "startSketchOn",
|
||||
"start": 13,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 13,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 13,
|
||||
"end": 32,
|
||||
"start": 13,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"commentStart": 124,
|
||||
"end": 125,
|
||||
"start": 124,
|
||||
"type": "PipeSubstitution",
|
||||
"type": "PipeSubstitution"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 109,
|
||||
"end": 123,
|
||||
"name": {
|
||||
"commentStart": 109,
|
||||
"end": 123,
|
||||
"name": "startProfileAt",
|
||||
"start": 109,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 109,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 109,
|
||||
"end": 126,
|
||||
"start": 109,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
}
|
||||
],
|
||||
"commentStart": 13,
|
||||
"end": 126,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"commentStart": 35,
|
||||
"end": 46,
|
||||
"start": 35,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "blockComment",
|
||||
"value": "|> arc({",
|
||||
"style": "line"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 49,
|
||||
"end": 68,
|
||||
"start": 49,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "blockComment",
|
||||
"value": "angleEnd: 270,",
|
||||
"style": "line"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 71,
|
||||
"end": 92,
|
||||
"start": 71,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "blockComment",
|
||||
"value": "angleStart: 450,",
|
||||
"style": "line"
|
||||
}
|
||||
},
|
||||
{
|
||||
"commentStart": 95,
|
||||
"end": 103,
|
||||
"start": 95,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "blockComment",
|
||||
"value": "}, %)",
|
||||
"style": "line"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"startNodes": []
|
||||
},
|
||||
"start": 13,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 1,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 126,
|
||||
"kind": "const",
|
||||
"start": 1,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 127,
|
||||
"start": 0
|
||||
}
|
||||
@ -1042,7 +1042,7 @@ pub async fn pattern_circular_2d(exec_state: &mut ExecState, args: Args) -> Resu
|
||||
|
||||
/// Repeat a 2-dimensional sketch some number of times along a partial or
|
||||
/// complete circle some specified number of times. Each object may
|
||||
/// additionally be rotated along the circle, ensuring orentation of the
|
||||
/// additionally be rotated along the circle, ensuring orientation of the
|
||||
/// solid with respect to the center of the circle is maintained.
|
||||
///
|
||||
/// ```no_run
|
||||
@ -1159,7 +1159,7 @@ pub async fn pattern_circular_3d(exec_state: &mut ExecState, args: Args) -> Resu
|
||||
|
||||
/// Repeat a 3-dimensional solid some number of times along a partial or
|
||||
/// complete circle some specified number of times. Each object may
|
||||
/// additionally be rotated along the circle, ensuring orentation of the
|
||||
/// additionally be rotated along the circle, ensuring orientation of the
|
||||
/// solid with respect to the center of the circle is maintained.
|
||||
///
|
||||
/// ```no_run
|
||||
|
||||
Reference in New Issue
Block a user