Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linting for newlines #1790

Merged
merged 2 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
branches: [ master ]

jobs:
linelint:
name: Linelint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fernandrone/linelint@master

test:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion lib/rouge/demos/brainfuck
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
This is a sample
comment.
]
.[>+<-]>,
.[>+<-]>,
2 changes: 1 addition & 1 deletion lib/rouge/demos/brightscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ function main(args as dynamic) as void
'Create a scene and load /components/helloworld.xml'
scene = screen.CreateScene("HelloWorld")
screen.show()
end function
end function
2 changes: 1 addition & 1 deletion lib/rouge/demos/bsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
Сообщить("Привет мир");
КонецПроцедуры

#КонецОбласти
#КонецОбласти
2 changes: 1 addition & 1 deletion lib/rouge/demos/cfscript
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ component accessors="true" {

return foo;
}
}
}
2 changes: 1 addition & 1 deletion lib/rouge/demos/coq
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Section with_T.
end.
End with_T.

Definition a_string := "hello \" world".
Definition a_string := "hello \" world".
2 changes: 1 addition & 1 deletion lib/rouge/demos/csvs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Transaction_Date: xDate
Transaction_ID: notEmpty
Originator_Name: notEmpty
Originator_Address: any("yes","no")
Originator_Country: notEmpty
Originator_Country: notEmpty
1 change: 0 additions & 1 deletion lib/rouge/demos/datastudio
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ select * from TABLE1 where COL1 like %VAR1%; //utiliser la variable VAR1 dans un

select * from TEST_TABLE; //exécution d'une requête Select pour ramener des valeurs
Affect_LastColumns("TEST1"); //création du paramètre TEST1

1 change: 0 additions & 1 deletion lib/rouge/demos/ecl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ somePeople := allPeople(LastName = 'Smith');

// Outputs ---
somePeople;

2 changes: 1 addition & 1 deletion lib/rouge/demos/erlang
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

%% Compute rectangle and circle area.
area({rectangle, Width, Ht}) -> Width * Ht;
area({circle, R}) -> 3.14159 * R * R.
area({circle, R}) -> 3.14159 * R * R.
2 changes: 1 addition & 1 deletion lib/rouge/demos/fsharp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ let rec existsLeaf test tree =
|| existsLeaf test right

let hasEvenLeaf tree =
existsLeaf (fun n -> n % 2 = 0) tree
existsLeaf (fun n -> n % 2 = 0) tree
2 changes: 1 addition & 1 deletion lib/rouge/demos/glsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ void main()
{
vertexColor = color;
gl_Position = vec4(position, 0.0, 1.0);
}
}
1 change: 0 additions & 1 deletion lib/rouge/demos/haxe
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
public static function hello(arg : String) {
return 'Hello $arg';
}

2 changes: 1 addition & 1 deletion lib/rouge/demos/nesasm
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Reset:
lda #$3f ; $3F -> A register
ldy #$00 ; $00 -> Y register
sta PPU_ADDR ; write #HIGH byte first
sty PPU_ADDR ; $3F00 -> PPU address
sty PPU_ADDR ; $3F00 -> PPU address
1 change: 0 additions & 1 deletion lib/rouge/demos/opentype_feature_file
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ languagesystem DFLT dflt;
feature liga {
sub f i by f_i;
} liga;

1 change: 0 additions & 1 deletion lib/rouge/demos/smarty
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
</ul>

<div class="{if $foo}class1{else}class2{/if}">{$foo.bar.baz}</div>

1 change: 0 additions & 1 deletion lib/rouge/formatters/html_inline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ def safe_span(tok, safe_val)
end
end
end

2 changes: 1 addition & 1 deletion lib/rouge/lexers/apache/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ def self.values
end
end
end
end
end
1 change: 0 additions & 1 deletion lib/rouge/lexers/eiffel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ class convert create debug deferred detachable do else elseif end
end
end
end

2 changes: 1 addition & 1 deletion lib/rouge/lexers/gherkin/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def Gherkin.keywords
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/rouge/lexers/handlebars.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ class Handlebars < TemplateLexer
end
end
end
end
end
1 change: 0 additions & 1 deletion lib/rouge/lexers/hylang.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,3 @@ def name_token(name)
end
end
end

1 change: 0 additions & 1 deletion lib/rouge/lexers/jsx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ class JSX < Javascript
end
end
end

2 changes: 1 addition & 1 deletion lib/rouge/lexers/lasso/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ def Lasso.keywords
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/rouge/lexers/llvm/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def self.instructions

end
end
end
end
2 changes: 1 addition & 1 deletion lib/rouge/lexers/lua/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ def self.builtins
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/rouge/lexers/mathematica/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def self.builtins
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/rouge/lexers/matlab/keywords.rb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion lib/rouge/lexers/ocl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ def self.functions
end
end
end

2 changes: 1 addition & 1 deletion lib/rouge/lexers/php/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@ def self.builtins
end
end
end
end
end
1 change: 0 additions & 1 deletion lib/rouge/lexers/prometheus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,3 @@ def self.functions
end
end
end

1 change: 0 additions & 1 deletion lib/rouge/lexers/q.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,3 @@ def self.builtins
end
end
end

2 changes: 1 addition & 1 deletion lib/rouge/lexers/sqf/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ def self.commands
end
end
end
end
end
1 change: 0 additions & 1 deletion lib/rouge/lexers/supercollider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ def self.constants
end
end
end

1 change: 0 additions & 1 deletion lib/rouge/lexers/tap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,3 @@ class Tap < RegexLexer
end
end
end

1 change: 0 additions & 1 deletion lib/rouge/lexers/tsx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ class TSX < JSX
end
end
end

1 change: 0 additions & 1 deletion lib/rouge/lexers/tulip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@ def self.detect?(text)
end
end
end

2 changes: 1 addition & 1 deletion lib/rouge/lexers/viml/keywords.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ def self.keywords
end
end
end
end
end
1 change: 0 additions & 1 deletion spec/lexers/augeas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/bibtex_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/cython_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@
end
end
end

2 changes: 1 addition & 1 deletion spec/lexers/fsharp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
assert_guess :mimetype => 'text/x-fsi'
end
end
end
end
2 changes: 0 additions & 2 deletions spec/lexers/ghc_cmm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1125,5 +1125,3 @@
end
end
end


1 change: 0 additions & 1 deletion spec/lexers/go_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/jsx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/mathematica_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/matlab_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/objective_c_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/ocaml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/prometheus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/q_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/r_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@
end
end
end

2 changes: 1 addition & 1 deletion spec/lexers/rego_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
end
end
end


1 change: 0 additions & 1 deletion spec/lexers/sas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/stan_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/stata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@

end
end

1 change: 0 additions & 1 deletion spec/lexers/tap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/tulip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
end
end
end

1 change: 0 additions & 1 deletion spec/lexers/vue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
end
end
end

2 changes: 1 addition & 1 deletion spec/lexers/xquery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
assert_guess :mimetype => 'application/xquery'
end
end
end
end
1 change: 0 additions & 1 deletion spec/visual/samples/applescript
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ set jp to "日本語"
set ru to "Русский"

jp & " and " & ru -- returns "日本語 and Русский"

2 changes: 1 addition & 1 deletion spec/visual/samples/brainfuck
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ This program will print "Hello world!"
------. l
--------. d
>+. !
>.
>.
2 changes: 1 addition & 1 deletion spec/visual/samples/brightscript
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ function createInitialState(screen as object) as object

initialState.addFields(initialStateFields)
return createStore(initialState, screen)
end function
end function
2 changes: 1 addition & 1 deletion spec/visual/samples/bsl
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@

#КонецЕсли

#КонецОбласти
#КонецОбласти
2 changes: 1 addition & 1 deletion spec/visual/samples/cfscript
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ if ( isDefined( "cgi.http_referrer" ) &&
throw("woohoo");
throw(type="wow", message="that escalated quickly");

}
}
2 changes: 1 addition & 1 deletion spec/visual/samples/d
Original file line number Diff line number Diff line change
Expand Up @@ -1585,4 +1585,4 @@ pure nothrow @safe @nogc unittest
assert(testVal.isNull);
}

// comment at eof
// comment at eof
1 change: 0 additions & 1 deletion spec/visual/samples/digdag
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ timezone: UTC
- type: script
command: scripts/hello.sh
args: [foo, bar]

Loading