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 c# support #40

Merged
merged 4 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions gengo/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
#
# WARNING: Please alphabetize!
---
C#:
category: programming
color: "#178600"
heuristics:
- "^\\s*(using\\s+[A-Z][\\s\\w.]+;|namespace\\s*[\\w\\.]+\\s*(\\{|;)|\\/\\/)"
matchers:
extensions:
- cs
CoffeeScript:
category: programming
color: "#3E2723"
Expand Down
10 changes: 5 additions & 5 deletions scripts/check-languages-file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def sorted?(array)
end
next if missing_required

if langdef.key?('heuristics') && !langdef['hueristics'].is_a?(Array)
STDERR.puts "#{langname}: 'hueristics' must be an array"
if langdef.key?('heuristics') && !langdef['heuristics'].is_a?(Array)
STDERR.puts "#{langname}: 'heuristics' must be an array"
exit_code = 1
end
hueristics = langdef['hueristics'] || []
sorted?(hueristics) do |a, b|
STDERR.puts "#{langname}: 'hueristics' are out of order: '#{a}' and '#{b}'"
heuristics = langdef['heuristics'] || []
sorted?(heuristics) do |a, b|
STDERR.puts "#{langname}: 'heuristics' are out of order: '#{a}' and '#{b}'"
exit_code = 1
end

Expand Down