From ff3d6e2eeabd3c180ce9ae44c3b942b1b482ffb3 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 11:17:59 +0500 Subject: [PATCH 1/9] Update heuristics.yml --- lib/linguist/heuristics.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 147b2c4635..0450c0fdea 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -89,7 +89,7 @@ disambiguations: - extensions: ['.bas'] rules: - language: FreeBasic - pattern: '^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' + pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' - language: BASIC pattern: '^\A\s*\d+' - extensions: ['.bb'] @@ -113,7 +113,7 @@ disambiguations: - extensions: ['.bi'] rules: - language: FreeBasic - pattern: '^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' + pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' - extensions: ['.bs'] rules: - language: Bikeshed From f382e49b1b2dfa07df4014202d7639df1e9e28be Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 13:47:48 +0500 Subject: [PATCH 2/9] Update heuristics.yml --- lib/linguist/heuristics.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 0450c0fdea..66a88c82e9 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -92,6 +92,8 @@ disambiguations: pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' - language: BASIC pattern: '^\A\s*\d+' + - language: VBA + pattern: '^\s*Attribute VB_Name = ' - extensions: ['.bb'] rules: - language: BlitzBasic From 92c2aef8a271211d1d0622a2088457b6f06b69d8 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 14:08:24 +0500 Subject: [PATCH 3/9] Update test_heuristics.rb --- test/test_heuristics.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index c8f51086c0..976c5a51c2 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -265,6 +265,7 @@ def test_asy_by_heuristics def test_bas_by_heuristics assert_heuristics({ + "VBA" => all_fixtures("VBA", "*.bas") "FreeBasic" => all_fixtures("FreeBasic", "*.bas"), "BASIC" => all_fixtures("BASIC", "*.bas"), nil => all_fixtures("VBA", "*.bas") From 769e2077a2730b9e19b1d5f76f1cdb329acdb3f6 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 14:13:47 +0500 Subject: [PATCH 4/9] Update test_heuristics.rb --- test/test_heuristics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index 976c5a51c2..d77824530a 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -265,7 +265,7 @@ def test_asy_by_heuristics def test_bas_by_heuristics assert_heuristics({ - "VBA" => all_fixtures("VBA", "*.bas") + "VBA" => all_fixtures("VBA", "*.bas"), "FreeBasic" => all_fixtures("FreeBasic", "*.bas"), "BASIC" => all_fixtures("BASIC", "*.bas"), nil => all_fixtures("VBA", "*.bas") From a047106dcf7b471a82aec2a4a00e5570eb9bb2d7 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 14:18:09 +0500 Subject: [PATCH 5/9] Update heuristics.yml --- lib/linguist/heuristics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 66a88c82e9..0dd48a44bf 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -89,7 +89,7 @@ disambiguations: - extensions: ['.bas'] rules: - language: FreeBasic - pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' + pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)\s' - language: BASIC pattern: '^\A\s*\d+' - language: VBA From ac8b47a39258bda0f0429675a1582529b683ac4a Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 14:23:16 +0500 Subject: [PATCH 6/9] Update test_heuristics.rb --- test/test_heuristics.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index d77824530a..c8f51086c0 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -265,7 +265,6 @@ def test_asy_by_heuristics def test_bas_by_heuristics assert_heuristics({ - "VBA" => all_fixtures("VBA", "*.bas"), "FreeBasic" => all_fixtures("FreeBasic", "*.bas"), "BASIC" => all_fixtures("BASIC", "*.bas"), nil => all_fixtures("VBA", "*.bas") From 1c047950a50f2d01e9507a6ee2efadb480ad6170 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 11 Apr 2023 14:28:57 +0500 Subject: [PATCH 7/9] Update heuristics.yml --- lib/linguist/heuristics.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 0dd48a44bf..5b5ceba971 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -92,8 +92,6 @@ disambiguations: pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)\s' - language: BASIC pattern: '^\A\s*\d+' - - language: VBA - pattern: '^\s*Attribute VB_Name = ' - extensions: ['.bb'] rules: - language: BlitzBasic From 89c6270ed278e51e638d290f68407efe116415e9 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 25 Apr 2023 18:17:02 +0500 Subject: [PATCH 8/9] Update lib/linguist/heuristics.yml Co-authored-by: John Gardner --- lib/linguist/heuristics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 5b5ceba971..a48d894242 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -89,7 +89,7 @@ disambiguations: - extensions: ['.bas'] rules: - language: FreeBasic - pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)\s' + pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|include|lang|macro)(?:$|\s)' - language: BASIC pattern: '^\A\s*\d+' - extensions: ['.bb'] From 22a4c9945b3b8e9edf00b14c59ffc4b71b5994f4 Mon Sep 17 00:00:00 2001 From: Xusinboy Bekchanov Date: Tue, 25 Apr 2023 18:17:11 +0500 Subject: [PATCH 9/9] Update lib/linguist/heuristics.yml Co-authored-by: John Gardner --- lib/linguist/heuristics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index a48d894242..8b9917004a 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -113,7 +113,7 @@ disambiguations: - extensions: ['.bi'] rules: - language: FreeBasic - pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s' + pattern: '^[ \t]*#(?i)(?:define|endif|endmacro|ifn?def|if|include|lang|macro)(?:$|\s)' - extensions: ['.bs'] rules: - language: Bikeshed