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 docs for admin #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add docs for admin #4

wants to merge 2 commits into from

Conversation

jchrtek
Copy link
Contributor

@jchrtek jchrtek commented Jul 26, 2017

No description provided.

end

end

Choose a reason for hiding this comment

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

Extra empty line detected at module body end.

encoder

end

Choose a reason for hiding this comment

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

Extra empty line detected at class body end.

end

encoder

Choose a reason for hiding this comment

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

Extra empty line detected at method body end.


end

if match = scan(/\n/)

Choose a reason for hiding this comment

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

Assignment in condition - you probably meant to use ==.

end

elsif match = scan(/.+/)
@html_scanner.tokenize match, :tokens => encoder

Choose a reason for hiding this comment

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

Use the new Ruby 1.9 hash syntax.

@html_scanner.tokenize self[2], :tokens => encoder if self[2]
end

elsif match = scan(/.+/)

Choose a reason for hiding this comment

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

Assignment in condition - you probably meant to use ==.

elsif match = scan(/((?:<|><?)(?![!?\/\w]))?(.+)?/)
encoder.text_token self[1], :plain if self[1]
# TODO: recognize #{...} snippets
@html_scanner.tokenize self[2], :tokens => encoder if self[2]

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.
Use the new Ruby 1.9 hash syntax.

end
end
elsif match = scan(/((?:<|><?)(?![!?\/\w]))?(.+)?/)
encoder.text_token self[1], :plain if self[1]

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.

@ruby_scanner.tokenize self[4], :tokens => encoder
end
end
elsif match = scan(/((?:<|><?)(?![!?\/\w]))?(.+)?/)

Choose a reason for hiding this comment

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

Assignment in condition - you probably meant to use ==.
Use %r around regular expression.

if self[2]
@embedded_ruby_scanner.tokenize self[4], :tokens => encoder
else
@ruby_scanner.tokenize self[4], :tokens => encoder

Choose a reason for hiding this comment

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

Use the new Ruby 1.9 hash syntax.

encoder.text_token self[1] + self[3], :plain
if self[4]
if self[2]
@embedded_ruby_scanner.tokenize self[4], :tokens => encoder

Choose a reason for hiding this comment

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

Use the new Ruby 1.9 hash syntax.


if scan(/(>?<?[-=]|[&!]=|(& |!)|~)( *)([^,\n\|]+(?:(, *|\|(?=.|\n.*\|$))\n?[^,\n\|]*)*)?/)
encoder.text_token self[1] + self[3], :plain
if self[4]

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.

encoder.text_token match, :tag
end

if scan(/(>?<?[-=]|[&!]=|(& |!)|~)( *)([^,\n\|]+(?:(, *|\|(?=.|\n.*\|$))\n?[^,\n\|]*)*)?/)

Choose a reason for hiding this comment

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

Line is too long. [100/80]

encoder.text_token self[3], :plain if self[3]
end

if tag && match = scan(/\//)

Choose a reason for hiding this comment

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

Assignment in condition - you probably meant to use ==.
Use %r around regular expression.

if tag && match = scan(/(\[)([^\]\n]+)?(\])?/)
encoder.text_token self[1], :plain
@ruby_scanner.tokenize self[2], :tokens => encoder if self[2]
encoder.text_token self[3], :plain if self[3]

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.


if tag && match = scan(/(\[)([^\]\n]+)?(\])?/)
encoder.text_token self[1], :plain
@ruby_scanner.tokenize self[2], :tokens => encoder if self[2]

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.
Use the new Ruby 1.9 hash syntax.

encoder.text_token match, :plain if match
end

if tag && match = scan(/(\[)([^\]\n]+)?(\])?/)

Choose a reason for hiding this comment

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

Assignment in condition - you probably meant to use ==.

end
@ruby_scanner.tokenize code, :tokens => encoder unless code.empty?

encoder.text_token match, :plain if match

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.

break
end
end
@ruby_scanner.tokenize code, :tokens => encoder unless code.empty?

Choose a reason for hiding this comment

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

Avoid more than 3 levels of block nesting.
Use the new Ruby 1.9 hash syntax.

else
break
end
when "\n", ",", nil

Choose a reason for hiding this comment

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

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@jchrtek jchrtek force-pushed the Add-docs-for-admin branch from 27517c5 to 8a3b851 Compare July 26, 2017 14:09
class ApplicationController < ActionController::Base
layout 'playground'


Choose a reason for hiding this comment

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

Extra blank line detected.
Extra empty line detected at class body end.

require_relative '../../../lib/blueberry_admin/coderay_slim.rb'

module BlueberryAdmin
class ApplicationController < ActionController::Base

Choose a reason for hiding this comment

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

Missing top-level class documentation comment.

@@ -0,0 +1,9 @@
require_relative '../../../lib/blueberry_admin/coderay_slim.rb'

Choose a reason for hiding this comment

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

Missing frozen string literal comment.

@jchrtek jchrtek force-pushed the Add-docs-for-admin branch from 8a3b851 to e065120 Compare July 26, 2017 14:10
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.

2 participants