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

Reduce Ruby warnings #1197

Merged
merged 2 commits into from
Jun 21, 2019
Merged

Reduce Ruby warnings #1197

merged 2 commits into from
Jun 21, 2019

Conversation

pocke
Copy link
Contributor

@pocke pocke commented Jun 18, 2019

Problem

Rouge gem displays many warnings on loading the gem.
This pull request will suppress most of the warnings.

Before

$ ruby -I lib -r rouge -e 
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/glsl.rb:21: warning: assigned but unused variable - ws
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/glsl.rb:22: warning: assigned but unused variable - id
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/idlang.rb:212: warning: character class has duplicated range: /[\s\n]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/idlang.rb:306: warning: character class has duplicated range: /[\s\n]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/groovy.rb:49: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/groovy.rb:60: warning: character class has duplicated range: /@\w[\w\d.]*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/groovy.rb:104: warning: character class has duplicated range: /\w[\w\d]*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/groovy.rb:109: warning: character class has duplicated range: /[\w\d.]+[*]?/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/groovy.rb:13: warning: assigned but unused variable - ws
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/julia.rb:182: warning: character class has duplicated range: / [ \[ \] { } \( \) , ; ] /
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ruby.rb:296: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/toml.rb:14: warning: character class has duplicated range: /[\w.\S]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/toml.rb:20: warning: character class has duplicated range: /(?<!=)\s*\[[\w\d\S]+\]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/toml.rb:59: warning: character class has duplicated range: /\\[0t\tn\n "\\ r]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/turtle.rb:26: warning: character class has duplicated range: /@[^\s,.; ]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/elixir.rb:31: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/elixir.rb:38: warning: character class has duplicated range: /[a-zA-Z_!][\w_]*[!\?]?/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/make.rb:14: warning: assigned but unused variable - bsd_special
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/make.rb:18: warning: assigned but unused variable - gnu_special
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/make.rb:22: warning: assigned but unused variable - line
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/crystal.rb:287: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/prolog.rb:36: warning: character class has duplicated range: /[[:lower:]]([_[:word:][:digit:]])*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/pony.rb:43: warning: character class has duplicated range: /[\s\t\r\n]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/plist.rb:26: warning: character class has duplicated range: /[\w_$\/:.-]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/bsl.rb:68: warning: character class has duplicated range: /[-+\/=<>*%=<>.?&]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/bsl.rb:72: warning: character class has duplicated range: /[\wа-яё_][\wа-яё0-9_]*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/conf.rb:21: warning: character class has duplicated range: /[^\d\w#"']+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/scala.rb:25: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/scala.rb:30: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/nasm.rb:14: warning: assigned but unused variable - ws
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/apple_script.rb:308: warning: assigned but unused variable - literals
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/abap.rb:191: warning: character class has duplicated range: /[\[\]\(\)\{\}\[\]\.,:\|]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/abap.rb:210: warning: character class has duplicated range: /\w[\w\d]*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/praat.rb:282: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/python.rb:203: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/rust.rb:96: warning: character class has duplicated range: /[*!@~&+%^<>=-\?]|\.{2,3}/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/go.rb:17: warning: character class has duplicated range: /[\s\t\r\n]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/powershell.rb:668: warning: character class has duplicated range: /<#[\s,\S]*?#>/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/fortran.rb:91: warning: character class has duplicated range: /[\s\n]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/fortran.rb:172: warning: character class has duplicated range: /[\s\n]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/haml.rb:71: warning: assigned but unused variable - comma_dot
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/terraform.rb:62: warning: character class has duplicated range: /[^$\n\$]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/m68k.rb:86: warning: character class has duplicated range: /[\s\t\r]+/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/m68k.rb:12: warning: assigned but unused variable - ws
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/verilog.rb:131: warning: character class has duplicated range: /[~!%^&*+-=\|?:<>\/@{}]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/verilog.rb:14: warning: assigned but unused variable - ws
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/sql.rb:100: warning: character class has duplicated range: /\w[\w\d]*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/sql.rb:108: warning: character class has duplicated range: /[+*\/<>=~!@#%^&|?^-]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/moonscript.rb:54: warning: character class has duplicated range: /[A-Z][\w\d_]*/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:89: warning: character class has duplicated range: /[~^*!%&\[\](){}<>|+=:;,.\/?-`]/
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:14: warning: assigned but unused variable - keywords
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:20: warning: assigned but unused variable - keywords_declaration
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:24: warning: assigned but unused variable - keywords_type
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:28: warning: assigned but unused variable - keywords_namespace
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:32: warning: assigned but unused variable - keywords_constant
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/ceylon.rb:36: warning: assigned but unused variable - annotations
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/guessers/glob_mapping.rb:35: warning: assigned but unused variable - score
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized

After

$ ruby -I lib -r rouge -e 
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/scala.rb:25: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/lexers/scala.rb:30: warning: character class has duplicated range
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized
/home/pocke/ghq/github.com/rouge-ruby/rouge/lib/rouge/theme.rb:134: warning: instance variable @mode not initialized

Solution

There are two types of warning. They are assigned but unused variable and character class has duplicated range.

Assigned but unused variable

It's easy. Just remove the assignments.

Character class has duplicated range

It is a regexp warning.
For example, /[aa]/ has the warning because the double a is redundant. It should be /[a]/.

I explain the individual cases.

\s includes \t and so on

\s includes \t, \r, and \n. So /[\s\n]/ has the warning. We can remove \n from the regular expression.

\w includes _ and \d

/[\w_]/ and /[\w\d]/ have the warning.

By the way, I guess it may be a bug of syntax.
For example, I changed /\w[\w\d]*/ to /\w+/in groovy lexer. This change does not affect the meaning of the regexp.

  state :class do
    rule %r/\s+/, Text
-   rule %r/\w[\w\d]*/, Name::Class, :pop!
+   rule %r/\w+/, Name::Class, :pop!
  end

But I guess Groovy (and other languages) class name does not allow a number on the first of the name.
So maybe it should be /[A-Za-z]\w*/. But I'm not sure the languages, so this pull request does not change the behavior that looks bugs.

x option does not ignore whitespaces in character class

Basically, x option ignores whitespaces in Regexp. But it does not ignore whitespaces in character class.

/ [a b] /x
#^ It is ignored
#   ^ It is not ignored

So /[a b c]/ displays the warning.
Julia lexer only has the warning.

- in the middle of character class

- works as a range in a character class. For example, /[a-z]/ matches "c" because "c" is between "a" and "z".
But rouge uses - unexpectedly. Rouge expects it just matches "-", but it is evaluated as a range.

Other change does not affect the behavior, but this change affects behaviour.
I guess they are bugs.

The following files had the warnings.

  • lib/rouge/lexers/ceylon.rb
  • lib/rouge/lexers/rust.rb
  • lib/rouge/lexers/verilog.rb

Note

Scala lexer has warnings even if this pull request is merged.
I tried to suppress the warnings, but it is difficult to me.

@pocke
Copy link
Contributor Author

pocke commented Jun 18, 2019

I overlooked #1189 , that solves the same problem.
I'll close own pull request.

Thank you.

@pocke
Copy link
Contributor Author

pocke commented Jun 18, 2019

I found warnings that are not solved by #1189 but solved by #1197.
If you'd like to suppress the warnings, apply the following patch to #1189 . Thank you!

diff --git a/lib/rouge/guessers/glob_mapping.rb b/lib/rouge/guessers/glob_mapping.rb
index f635328..615ac2b 100644
--- a/lib/rouge/guessers/glob_mapping.rb
+++ b/lib/rouge/guessers/glob_mapping.rb
@@ -32,7 +32,7 @@ module Rouge
         basename = File.basename(filename)
 
         collect_best(lexers) do |lexer|
-          score = (@glob_map[lexer.name] || []).map do |pattern|
+          (@glob_map[lexer.name] || []).map do |pattern|
             if test_glob(pattern, basename)
               # specificity is better the fewer wildcards there are
               -pattern.scan(/[*?\[]/).size
diff --git a/lib/rouge/lexers/apple_script.rb b/lib/rouge/lexers/apple_script.rb
index 5e44a63..22a4ba6 100644
--- a/lib/rouge/lexers/apple_script.rb
+++ b/lib/rouge/lexers/apple_script.rb
@@ -305,7 +305,6 @@ module Rouge
 
       operators = %r(\b(#{self.operators.to_a.join('|')})\b)
       classes = %r(\b(as )(#{self.classes.to_a.join('|')})\b)
-      literals = %r(\b(#{self.literals.to_a.join('|')})\b)
       commands = %r(\b(#{self.commands.to_a.join('|')})\b)
       controls = %r(\b(#{self.controls.to_a.join('|')})\b)
       declarations = %r(\b(#{self.declarations.to_a.join('|')})\b)
diff --git a/lib/rouge/lexers/ceylon.rb b/lib/rouge/lexers/ceylon.rb
index dab6bba..d5c9347 100644
--- a/lib/rouge/lexers/ceylon.rb
+++ b/lib/rouge/lexers/ceylon.rb
@@ -11,34 +11,6 @@ module Rouge
       title "Ceylon"
       desc 'Say more, more clearly.'
 
-      keywords = %w(
-        break case catch continue else finally for in
-        if return switch this throw try while is exists dynamic
-        nonempty then outer assert let
-      )
-      
-      keywords_declaration = %w(
-        abstracts extends satisfies super given of out assign
-      )
-      
-      keywords_type = %w(
-        function value void new
-      )
-      
-      keywords_namespace = %w(
-        assembly module package
-      )
-      
-      keywords_constant = %w(
-        true false null
-      )
-
-      annotations = %w(
-        shared abstract formal default actual variable deprecated small
-        late literal doc by see throws optional license tagged final native
-        annotation sealed
-      )
-
       state :whitespace do
         rule %r([^\S\n]+), Text
         rule %r(//.*?\n), Comment::Single
diff --git a/lib/rouge/lexers/glsl.rb b/lib/rouge/lexers/glsl.rb
index a9227ff..d1d65f5 100644
--- a/lib/rouge/lexers/glsl.rb
+++ b/lib/rouge/lexers/glsl.rb
@@ -17,10 +17,6 @@ module Rouge
       title "GLSL"
       desc "The GLSL shader language"
 
-      # optional comment or whitespace
-      ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+)
-      id = /[a-zA-Z_][a-zA-Z0-9_]*/
-
       def self.keywords
         @keywords ||= Set.new %w(
           attribute const uniform varying
diff --git a/lib/rouge/lexers/haml.rb b/lib/rouge/lexers/haml.rb
index 6603c63..e63486a 100644
--- a/lib/rouge/lexers/haml.rb
+++ b/lib/rouge/lexers/haml.rb
@@ -66,10 +66,6 @@ module Rouge
       # To accomodate this, use this custom faux dot instead.
       dot = /[ ]\|\n(?=.*[ ]\|)|./
 
-      # In certain places, a comma at the end of the line
-      # allows line wrapping as well.
-      comma_dot = /,\s*\n|#{dot}/
-
       state :root do
         rule %r/\s*\n/, Text
         rule(/\s*/) { |m| token Text; indentation(m[0]) }
diff --git a/lib/rouge/lexers/m68k.rb b/lib/rouge/lexers/m68k.rb
index 42e4cac..2206fa7 100644
--- a/lib/rouge/lexers/m68k.rb
+++ b/lib/rouge/lexers/m68k.rb
@@ -9,7 +9,6 @@ module Rouge
       title "M68k"
       desc "Motorola 68k Assembler"
 
-      ws = %r((?:\s|;.*?\n/)+)
       id = /[a-zA-Z_][a-zA-Z0-9_]*/
 
       def self.keywords
diff --git a/lib/rouge/lexers/make.rb b/lib/rouge/lexers/make.rb
index 485a88c..9140dbf 100644
--- a/lib/rouge/lexers/make.rb
+++ b/lib/rouge/lexers/make.rb
@@ -11,16 +11,6 @@ module Rouge
       filenames '*.make', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile'
       mimetypes 'text/x-makefile'
 
-      bsd_special = %w(
-        include undef error warning if else elif endif for endfor
-      )
-
-      gnu_special = %w(
-        ifeq ifneq ifdef ifndef else endif include -include define endef :
-      )
-
-      line = /(?:\\.|\\\n|[^\\\n])*/m
-
       def initialize(opts={})
         super
         @shell = Shell.new(opts)
diff --git a/lib/rouge/lexers/nasm.rb b/lib/rouge/lexers/nasm.rb
index c5e4805..2ebd975 100644
--- a/lib/rouge/lexers/nasm.rb
+++ b/lib/rouge/lexers/nasm.rb
@@ -11,7 +11,6 @@ module Rouge
       title "Nasm"
       desc "Netwide Assembler"
 
-      ws = %r((?:\s|;.*?\n/)+)
       id = /[a-zA-Z_][a-zA-Z0-9_]*/
 
       #todo: pull more instructions from: http://www.nasm.us/doc/nasmdocb.html
diff --git a/lib/rouge/lexers/powershell.rb b/lib/rouge/lexers/powershell.rb
index 00770a7..61993e3 100644
--- a/lib/rouge/lexers/powershell.rb
+++ b/lib/rouge/lexers/powershell.rb
@@ -665,7 +665,7 @@ module Rouge
       end
 
       prepend :basic do
-        rule %r(<#[\s,\S]*?#>)m, Comment::Multiline
+        rule %r(<#[\s\S]*?#>)m, Comment::Multiline
         rule %r/#.*$/, Comment::Single
         rule %r/\b(#{OPERATORS})\s*\b/i, Operator
         rule %r/\b(#{ATTRIBUTES})\s*\b/i, Name::Attribute
diff --git a/lib/rouge/lexers/prolog.rb b/lib/rouge/lexers/prolog.rb
index c905fe7..b3b0097 100644
--- a/lib/rouge/lexers/prolog.rb
+++ b/lib/rouge/lexers/prolog.rb
@@ -27,7 +27,7 @@ module Rouge
       end
 
       state :atoms do
-        rule %r/[[:lower:]]([_[:word:][:digit:]])*/, Str::Symbol
+        rule %r/[[:lower:]]([[:word:]])*/, Str::Symbol
         rule %r/'[^']*'/, Str::Symbol
       end
 
diff --git a/lib/rouge/lexers/python.rb b/lib/rouge/lexers/python.rb
index 76ddeab..584f1c5 100644
--- a/lib/rouge/lexers/python.rb
+++ b/lib/rouge/lexers/python.rb
@@ -194,7 +194,7 @@ module Rouge
         rule %r(\\
           ( [\\abfnrtv"']
           | \n
-          | N{[a-zA-z][a-zA-Z ]+[a-zA-Z]}
+          | N{[a-zA-Z][a-zA-Z ]+[a-zA-Z]}
           | u[a-fA-F0-9]{4}
           | U[a-fA-F0-9]{8}
           | x[a-fA-F0-9]{2}
diff --git a/lib/rouge/lexers/ruby.rb b/lib/rouge/lexers/ruby.rb
index 8f93311..e37561d 100644
--- a/lib/rouge/lexers/ruby.rb
+++ b/lib/rouge/lexers/ruby.rb
@@ -289,9 +289,9 @@ module Rouge
         rule %r/\s+/, Text
         rule %r/\(/, Punctuation, :defexpr
         rule %r(
-          (?:([a-zA-Z_][\w_]*)(\.))?
+          (?:([a-zA-Z_]\w*)(\.))?
           (
-            [a-zA-Z_][\w_]*[!?]? |
+            [a-zA-Z_]\w*[!?]? |
             \*\*? | [-+]@? | [/%&\|^`~] | \[\]=? |
             <<? | >>? | <=>? | >= | ===?
           )
diff --git a/lib/rouge/lexers/terraform.rb b/lib/rouge/lexers/terraform.rb
index f3588be..ad4fc59 100644
--- a/lib/rouge/lexers/terraform.rb
+++ b/lib/rouge/lexers/terraform.rb
@@ -59,7 +59,7 @@ module Rouge
 
       state :heredoc do
         rule %r/\n/, Str::Heredoc, :heredoc_nl
-        rule %r/[^$\n\$]+/, Str::Heredoc
+        rule %r/[^$\n]+/, Str::Heredoc
         rule %r/[$]/, Str::Heredoc
         mixin :strings
       end
diff --git a/lib/rouge/lexers/verilog.rb b/lib/rouge/lexers/verilog.rb
index 0ef24b0..ed7a8b9 100644
--- a/lib/rouge/lexers/verilog.rb
+++ b/lib/rouge/lexers/verilog.rb
@@ -10,8 +10,6 @@ module Rouge
       filenames '*.v', '*.sv', '*.svh'
       mimetypes 'text/x-verilog', 'text/x-systemverilog'
 
-      # optional comment or whitespace
-      ws = %r((?:\s|//.*?\n|/[*].*?[*]/)+)
       id = /[a-zA-Z_][a-zA-Z0-9_]*/
 
       def self.keywords
@@ -128,8 +126,8 @@ module Rouge
         rule %r/[0-9]*'b?[01xz_?]+/, Num::Bin
         rule %r/[0-9]*'d[0-9_?]+/, Num::Integer
         rule %r/[0-9_]+[lu]*/i, Num::Integer
-        rule %r([~!%^&*+-=\|?:<>/@{}]), Operator
-        rule %r/[()\[\],.$\#]/, Punctuation
+        rule %r([-~!%^&*+=\|?:<>/@{}]), Operator
+        rule %r/[()\[\],.$\#;]/, Punctuation
         rule %r/`(\w+)/, Comment::Preproc
 
         rule id do |m|

@ashmaroli
Copy link
Contributor

@pocke Nice to see your PR here.
Don't close this. I believe this is more complete than #1189

@ashmaroli
Copy link
Contributor

@pocke Suppose #1189 gets merged first (because it is more atomic and hence easier to review), are you willing to resolve any arising conflicts with this branch..?

@pocke
Copy link
Contributor Author

pocke commented Jun 18, 2019

@pocke Suppose #1189 gets merged first (because it is more atomic and hence easier to review), are you willing to resolve any arising conflicts with this branch..?

That's reasonable. I'll resolve the conflicts.

Thank you for your suggestion.

@pyrmont pyrmont added the dependent-pr The PR is dependent on other changes being merged and will be reviewed later. label Jun 18, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jun 19, 2019

#1189 has now been merged.

@pyrmont pyrmont added needs-review The PR needs to be reviewed and removed dependent-pr The PR is dependent on other changes being merged and will be reviewed later. labels Jun 19, 2019
@pocke
Copy link
Contributor Author

pocke commented Jun 19, 2019

I resolved the conflict. Thanks.

@pyrmont
Copy link
Contributor

pyrmont commented Jun 19, 2019

@pocke Thanks for submitting this. It looks like a terrific step forward to the goal of reducing warnings!

It will take a little bit of time to review but I really appreciate the detailed comment explaining the PR. It's really helpful :)

Copy link
Contributor

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for this, @pocke. It's truly appreciated.

lib/rouge/lexers/apple_script.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/make.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/verilog.rb Show resolved Hide resolved
@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Jun 20, 2019
@pyrmont pyrmont merged commit 768b10e into rouge-ruby:master Jun 21, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jun 21, 2019

@pocke Thanks so much for helping to improve Rouge. I'm sorry those warnings are still there for the local variables I asked you to put back. I'm hopeful to address this problem soon!

@pyrmont pyrmont removed author-action The PR has been reviewed but action by the author is needed labels Jun 21, 2019
@pocke pocke deleted the w branch June 22, 2019 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants