diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7f6a41b5cb..d8083753c7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -5,8 +5,8 @@ title: '' labels: Bug assignees: '' --- - ## Describe the bug - diff --git a/.github/ISSUE_TEMPLATE/new_language.md b/.github/ISSUE_TEMPLATE/new_language.md index ef1685e431..bee9d0c029 100644 --- a/.github/ISSUE_TEMPLATE/new_language.md +++ b/.github/ISSUE_TEMPLATE/new_language.md @@ -8,7 +8,7 @@ assignees: '' diff --git a/docs/how-linguist-works.md b/docs/how-linguist-works.md index 817035ab25..453c1dd89d 100644 --- a/docs/how-linguist-works.md +++ b/docs/how-linguist-works.md @@ -23,7 +23,7 @@ The percentages are calculated based on the bytes of code for each language as r ## How Linguist works on GitHub.com -When you push changes to a repository on GitHub.com, +When you push changes to a repository on GitHub.com, a low priority background job is enqueued to analyze the [default branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#about-the-default-branch) of your repository as explained above. The results of this analysis are cached for the lifetime of your repository and are only updated when the repository is updated. As this analysis is performed by a low priority background job, it can take a while, particularly during busy periods, for your language statistics bar to reflect your changes. diff --git a/ext/linguist/lex.linguist_yy.c b/ext/linguist/lex.linguist_yy.c index 7d0439f2af..b7a88d84b7 100644 --- a/ext/linguist/lex.linguist_yy.c +++ b/ext/linguist/lex.linguist_yy.c @@ -243,7 +243,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -260,7 +260,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; @@ -384,10 +384,10 @@ typedef size_t yy_size_t; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -1016,7 +1016,7 @@ extern int yywrap ( yyscan_t yyscanner ); #endif #ifndef YY_NO_UNPUT - + #endif #ifndef yytext_ptr @@ -2165,7 +2165,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -2231,7 +2231,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) } b->yy_is_interactive = 0; - + errno = oerrno; } @@ -2373,7 +2373,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -2409,7 +2409,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann */ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } @@ -2426,7 +2426,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); buf = (char *) yyalloc( n , yyscanner ); @@ -2499,7 +2499,7 @@ int yyget_lineno (yyscan_t yyscanner) if (! YY_CURRENT_BUFFER) return 0; - + return yylineno; } @@ -2512,7 +2512,7 @@ int yyget_column (yyscan_t yyscanner) if (! YY_CURRENT_BUFFER) return 0; - + return yycolumn; } @@ -2574,7 +2574,7 @@ void yyset_lineno (int _line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); - + yylineno = _line_number; } @@ -2589,7 +2589,7 @@ void yyset_column (int _column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "yyset_column called with no buffer" ); - + yycolumn = _column_no; } @@ -2807,6 +2807,3 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" #line 173 "tokenizer.l" - - - diff --git a/ext/linguist/lex.linguist_yy.h b/ext/linguist/lex.linguist_yy.h index 6f8904916e..9e02bc01df 100644 --- a/ext/linguist/lex.linguist_yy.h +++ b/ext/linguist/lex.linguist_yy.h @@ -246,7 +246,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -263,7 +263,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; diff --git a/ext/linguist/tokenizer.l b/ext/linguist/tokenizer.l index f6cd52dbcf..25762c0bc3 100644 --- a/ext/linguist/tokenizer.l +++ b/ext/linguist/tokenizer.l @@ -171,4 +171,3 @@ .|\n { /* nothing */ } %% - diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 147b2c4635..1caeaf96e5 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -147,7 +147,7 @@ disambiguations: - named_pattern: vb-class - pattern: '^\s*BEGIN\R\s*MultiUse\s*=.*\R\s*Persistable\s*=' - language: VBA - named_pattern: vb-class + named_pattern: vb-class - language: TeX pattern: '^\s*\\(?:NeedsTeXFormat|ProvidesClass){' - language: ObjectScript @@ -258,7 +258,7 @@ disambiguations: - language: Visual Basic 6.0 and: - named_pattern: vb-form - - pattern: '^\s*Begin\s+VB\.Form\s+' + - pattern: '^\s*Begin\s+VB\.Form\s+' - extensions: ['.fs'] rules: - language: Forth diff --git a/script/build-grammars-tarball b/script/build-grammars-tarball index 8eb6d21298..e550d8ddce 100755 --- a/script/build-grammars-tarball +++ b/script/build-grammars-tarball @@ -5,5 +5,3 @@ cd "$(dirname "$0")/.." rm -rf ./linguist-grammars ./script/grammar-compiler compile -o linguist-grammars || true tar -zcvf linguist-grammars.tar.gz linguist-grammars - - diff --git a/test/test_file_blob.rb b/test/test_file_blob.rb index 3a80a451c8..9a5445e050 100644 --- a/test/test_file_blob.rb +++ b/test/test_file_blob.rb @@ -580,7 +580,7 @@ def test_vendored # GitHub.com assert sample_blob(".github/CODEOWNERS").vendored? assert sample_blob(".github/workflows/test.yml").vendored? - + # obsidian.md settings assert sample_blob(".obsidian/app.json").vendored? assert sample_blob(".obsidian/plugins/templater-obsidian/main.js").vendored? diff --git a/test/test_heuristics.rb b/test/test_heuristics.rb index c8f51086c0..e8dabdef70 100755 --- a/test/test_heuristics.rb +++ b/test/test_heuristics.rb @@ -430,7 +430,7 @@ def test_fr_by_heuristics "Text" => all_fixtures("Text", "*.fr") }) end - + def test_frm_by_heuristics assert_heuristics({ "VBA" => all_fixtures("VBA", "*.frm"), diff --git a/test/test_samples.rb b/test/test_samples.rb index d2a1c5c9e2..1684d79c43 100644 --- a/test/test_samples.rb +++ b/test/test_samples.rb @@ -99,7 +99,7 @@ def test_filename_listed end end end - + def case_insensitive_glob(extension) glob = "" extension.each_char do |c|