Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: link list→linked list (#3742)
Andrew Dunbar1c85a09ac03c
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex 9a1489d10..91ae1ccf0 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -5320,6 +5320,13 @@"label": "A Means To An End"}},+ {+ "Bool": {+ "name": "LinkedList",+ "state": true,+ "label": "Linked List"+ }+ },{"Bool": {"name": "CallItQuits",diff --git a/harper-core/src/linting/weir_rules/LinkedList/Plural.weir b/harper-core/src/linting/weir_rules/LinkedList/Plural.weirnew file mode 100644index 000000000..905cb0520--- /dev/null+++ b/harper-core/src/linting/weir_rules/LinkedList/Plural.weir@@ -0,0 +1,10 @@+expr main link lists++let message "If you mean the low-level data structure, use `linked lists` instead of `link lists`."+let description "Corrects `link lists` to `linked lists`."+let kind "Usage"+let becomes "linked lists"++test "Tree data structure was used for the implementation of buddy system where as two separate doubly link lists have been used to keep the record of the holes and the memory allocated to the processes" "Tree data structure was used for the implementation of buddy system where as two separate doubly linked lists have been used to keep the record of the holes and the memory allocated to the processes"+test "Link lists are self organizing to keep the nodes close to each other to benefit from cache locality." "Linked lists are self organizing to keep the nodes close to each other to benefit from cache locality."+test "Link lists are composed of nodes. Each node contains a value and points to a single child node: Visualization of 4 nodes in a linked list." "Linked lists are composed of nodes. Each node contains a value and points to a single child node: Visualization of 4 nodes in a linked list."\ No newline at end of filediff --git a/harper-core/src/linting/weir_rules/LinkedList/Singular.weir b/harper-core/src/linting/weir_rules/LinkedList/Singular.weirnew file mode 100644index 000000000..a22c7fc6c--- /dev/null+++ b/harper-core/src/linting/weir_rules/LinkedList/Singular.weir@@ -0,0 +1,14 @@+expr main link list++let message "If you mean the low-level data structure, use `linked list` instead of `link list`."+let description "Corrects `link list` to `linked list`."+let kind "Usage"+let becomes "linked list"++#TODO broken due to #3741 - replace_with_match_case works by index+#test "Backtracking/Examples/Reverse Link List Recursion.java" "Backtracking/Examples/Reverse Linked List Recursion.java"+#test "006 Link List/ → More linked list practice" "006 Linked List/ → More linked list practice"+#test "LIST OF DATA STRUCTURES · Link List. Singly linked list; Doubly linked list; Circular linked list · Stacks. Array based; Link List based · Queues." "LIST OF DATA STRUCTURES · Linked List. Singly linked list; Doubly linked list; Circular linked list · Stacks. Array based; Linked List based · Queues."+test "Doubly link list with header circular." "Doubly linked list with header circular."+test "link list implementation in c language." "linked list implementation in c language."+test "use one pointer to construct double-link list." "use one pointer to construct double-linked list."