-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tree-sitter support * Add additional test cases * Eldev for github actions * More tests * Java/c#/lua/elisp/ruby/rust support * Teleport to new locations from tree-sitter node * More flexible format of configurations * Templates for log message formatters * Defcustom instead of defvar
- Loading branch information
Showing
12 changed files
with
902 additions
and
607 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,37 +1,42 @@ | ||
name: check | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- "feature/*" | ||
paths-ignore: ['**.md', '**.adoc'] | ||
pull_request: | ||
paths-ignore: ['**.md', '**.adoc'] | ||
|
||
jobs: | ||
check: | ||
test: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{matrix.emacs_version == 'snapshot'}} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
emacs_version: | ||
- 26.1 | ||
- 26.2 | ||
- 26.3 | ||
ignore_warnings: | ||
- true | ||
include: | ||
- emacs_version: snapshot | ||
ignore_warnings: false | ||
emacs_version: ['25.1', '25.2', '25.3', | ||
'26.1', '26.2', '26.3', | ||
'27.1', '27.2', | ||
'snapshot'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: purcell/setup-emacs@master | ||
with: | ||
version: ${{ matrix.emacs_version }} | ||
- uses: leotaku/elisp-check@master | ||
with: | ||
file: turbo-log.el | ||
ignore_warnings: ${{ matrix.ignore_warnings }} | ||
- uses: leotaku/elisp-check@master | ||
with: | ||
check: ert | ||
file: test.el | ||
- name: Set up Emacs | ||
uses: purcell/setup-emacs@master | ||
with: | ||
version: ${{matrix.emacs_version}} | ||
|
||
- name: Install Eldev | ||
run: curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev | sh | ||
|
||
- name: Check out the source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install node js for tree-sitter | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Install tree-sitter | ||
run: npm install -g [email protected] | ||
- name: Test the project | ||
run: | | ||
eldev prepare && eldev -p -dtT -C test | ||
eldev prepare && eldev -p -dtT -C compile --warnings-as-errors turbo-log.el |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
; -*- mode: emacs-lisp; lexical-binding: t -*- | ||
|
||
;; Autodetermined by `eldev init'. | ||
(eldev-use-package-archive 'melpa) | ||
(eldev-add-extra-dependencies 'test 'typescript-mode) | ||
(eldev-add-extra-dependencies 'test 'tree-sitter-langs) |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
public class IteratorWithoutLocalExample | ||
{ | ||
public static void Main() | ||
{ | ||
IEnumerable<int> xs = OddSequence(50, 110); | ||
|
||
foreach (var x in xs) // line 11 | ||
{ | ||
Console.Write($"{x} "); | ||
} | ||
} | ||
|
||
public static IEnumerable<int> OddSequence(int start, int end) | ||
{ | ||
|
||
|
||
string[] cars = {"Volvo", | ||
"BMW", | ||
"Ford", "Mazda"}; | ||
|
||
if (start < 0 || start > 99) | ||
throw new ArgumentOutOfRangeException(nameof(start), "start must be between 0 and 99."); | ||
if (end > 100) | ||
throw new ArgumentOutOfRangeException(nameof(end), "end must be less than or equal to 100."); | ||
if (start >= end) | ||
throw new ArgumentException("start must be less than end."); | ||
|
||
for (int i = start; i <= end; i++) | ||
{ | ||
if (i % 2 == 1) | ||
yield return i; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
const myConst = "Whatever your want" | ||
|
||
func main() { | ||
myVar := "variable" | ||
|
||
b := 12 | ||
fmt.Println("This print will not be comment") | ||
} | ||
|
||
func test(bath int) { | ||
if bath == 0 {} | ||
return 2 | ||
} | ||
|
||
func realyBingFunctionWithAlotArgs( | ||
ke int, | ||
be string, | ||
anotherBigArguments *[]int, | ||
another string, | ||
) { | ||
a := 12 | ||
b := "qwe" | ||
bigArray := []int{ | ||
1, 2, 3, | ||
4, 5, 6, | ||
7, 9, 10, | ||
} | ||
fmt.Println("TCL: [line 34][test.go] bigArray: ", bigArray) | ||
|
||
const { b, c } = {c: 2, b: 1} | ||
} | ||
|
||
func findUserById(func(string) *User) {} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Simple{ | ||
public static void main(String args[]){ | ||
|
||
int[] intArray = new int[]{ 1,2,3, | ||
4,5,6, | ||
7,8,9,10 }; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function fact (n) | ||
if n == 0 then | ||
return 1 | ||
else | ||
return n * fact(n-1) | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class TestClass: | ||
def test(self): | ||
hello_world = "Hello world" | ||
another_var = 12 | ||
result = f"{hello_world} {another_var}" | ||
return hello_world | ||
|
||
def test2( | ||
self, | ||
a, | ||
b, | ||
): | ||
hello_world = "Hello world" | ||
another_var = 12 | ||
b = [1, 2, 3, 4, 5, 6, 7, 8, 9] | ||
result = f"{hello_world} {another_var}" | ||
|
||
# print("[line 7][test.py] TCL: hello_world: ", hello_world) | ||
return hello_world |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def AddNum(num1, | ||
num2) | ||
add = num1 + num2; | ||
print "Addition is: ",add; | ||
if add > 2 | ||
print "more then 2!"; | ||
end | ||
return add; | ||
end |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
class TestClass { | ||
private t: any; | ||
private b: string; | ||
private myAnotherVariable: any; | ||
|
||
constructor(t: any, b: string, myAnotherVariable: number) { | ||
this.t = t; | ||
this.b = b; | ||
this.myAnowtherVariable = myAnotherVariable; | ||
console.log( | ||
"This message will not be comment, cause it made by programmers." | ||
); | ||
} | ||
} | ||
|
||
function myFuncWithEmptyBody(qwwe) {} | ||
|
||
function test(): string { | ||
const hello = "Hello"; | ||
return hello; | ||
} | ||
|
||
function testFuncWithBigSignature( | ||
name: string, | ||
age: number, | ||
patronymic?: string | ||
): string { | ||
return `${name} is ${age} years old. ${patronymic}`; | ||
} | ||
|
||
function test() { | ||
const foo = 1; | ||
const bar = 2; | ||
const b = [1, 2, 3, 10, 12, 22, 33, 44, 15]; | ||
|
||
const a = 4; | ||
if ((a = 1)) { | ||
} | ||
|
||
for (let b = 0; b < 4; b++) {} | ||
} | ||
|
||
const a = () => ({}); | ||
|
||
function test() { | ||
const foo = 1; | ||
|
||
const bar = 2; | ||
} | ||
|
||
const a = (k) => { | ||
const b = k; | ||
}; |
Oops, something went wrong.