Comments (6)
@ohbarye @jeremybdk I was able to reproduce in a simple way:
$ mkdir repro && cd repro
$ git clone [email protected]:reviewdog/action-rubocop.git
Cloning into 'action-rubocop'...
[...]
$ gem install rubocop
Successfully installed rubocop-1.23.0
[...]
$ touch empty_file.rb
$ rubocop empty_file.rb
Inspecting 1 file
W
Offenses:
empty_file.rb:1:1: W: Lint/EmptyFile: Empty file detected.
1 file inspected, 1 offense detected
$ rubocop --require ./action-rubocop/rdjson_formatter/rdjson_formatter.rb --format RdjsonFormatter empty_file.rb
{"source":{"name":"rubocop","url":"https://rubocop.org/"},"diagnostics":[]}
undefined method `begin' for #<RuboCop::Cop::Offense::PseudoSourceRange:0x00007f9dd5949ab0>
Did you mean? begin_pos
/private/tmp/repro/action-rubocop/rdjson_formatter/rdjson_formatter.rb:41:in `build_diagnostic'
/private/tmp/repro/action-rubocop/rdjson_formatter/rdjson_formatter.rb:19:in `block in file_finished'
/private/tmp/repro/action-rubocop/rdjson_formatter/rdjson_formatter.rb:18:in `each'
/private/tmp/repro/action-rubocop/rdjson_formatter/rdjson_formatter.rb:18:in `file_finished'
[...]
I wonder if rubocop/rubocop#8823 will give any insight to the fix - it sounds like it fixed a (very?) similar issue: rubocop/rubocop#8718
from action-rubocop.
Thanks @owst , I figured out the cause. Let me try to fix in #56.
from action-rubocop.
I had the same issue and swapped uses: reviewdog/action-rubocop@v2
to uses: reviewdog/action-rubocop@v1
Everything seems to be working ok now
from action-rubocop.
I also have the same issue since updating to v2, can I help somehow?
from action-rubocop.
I guess the suggestion feature that is introduced since v2 is related to the error.
action-rubocop/rdjson_formatter/rdjson_formatter.rb
Lines 71 to 72 in 4c4064d
@nononoy @johnofsydney @jeremybdk
Could you give me an example Ruby code to reproduce the error?
from action-rubocop.
@ohbarye The thing is I don't really know what's causing this error, as it's always present, is there a way to have more details about the error?
from action-rubocop.
Related Issues (20)
- Add ability to skip install of rubocop and extensions HOT 1
- How i can use my own robocop rule? HOT 1
- Set default token to `github_token` input parameter HOT 5
- Fail running rubocop step if rubocop command itself fails HOT 5
- gem install was failed with Ruby 2.6.6 HOT 2
- Getting undefined method `cleanpath` when running via GitHub HOT 6
- Takes too long HOT 5
- getting REVIEWDOG_GITHUB_API_TOKEN error HOT 2
- [BUG] Invalid request. Only 65535 characters are allowed; 70292 were supplied. HOT 6
- undefined method `begin' for nil:NilClass HOT 2
- Possible to suggest linting corrections? HOT 5
- GitHub marketplace shows v1 as the latest HOT 2
- Rubocop info severity causes build failure
- reviewdog fails to parse when `--server` option is given HOT 1
- `Style/MethodDefParentheses` creates a suggestion with just one opening parenthese
- Cache ruby gems to speed up installation HOT 2
- Replace actions/create-release HOT 1
- rubocop_extensions installation version from Gemfile does not work with wrong definition order of gems HOT 5
- The suggedtion for `Rails/RedundantActiveRecordAllMethod` is incorrect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-rubocop.