This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dirty | |
# This method smells of :reek:NestedIterators but ignores them | |
def awful(x, y, offset = 0, log = false) | |
puts @screen.title | |
@screen = widgets.map { |w| w.each { |key| key += 3 * x } } | |
puts @screen.contents | |
puts @screen.contents | |
puts @screen.contents | |
puts @screen.contents | |
puts @screen.contents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
input_file = 'eslint_result.json' | |
output_file = 'eslint_todo.json' | |
array = JSON.parse open(input_file, &:read) | |
rules_counts = {} | |
array.each do |file| | |
next if file['errorCount'] == 0 && file['warningCount'] == 0 | |
file['messages'].each do |message| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
input_file = 'eslint_result.json' | |
output_file = 'eslint_todo.json' | |
array = JSON.parse open(input_file, &:read) | |
rules_counts = {} | |
array.each do |file| | |
next if file['errorCount'] == 0 && file['warningCount'] == 0 | |
file['messages'].each do |message| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: com.example.mysql | |
pattern: mysql_* | |
message: | | |
Do not use mysql_* functions. | |
Please use PDO or Framework's ORM. | |
MySQL Functions (PDO_MYSQL) | |
http://php.net/manual/en/ref.pdo-mysql.php | |
glob: | |
- "**/*.php" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
#==================================================================== | |
# PHP コア | |
# INI ディレクティブ | |
#-------------------------------------------------------------------- | |
# 言語オプション | |
- id: com.sideci.php.core.ini.asp_tags | |
pattern: | |
regexp: '([''"])asp_tags\1' | |
glob: "**/*.php" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The MIT License | |
* Copyright (c) 2014-2016 Ilkka Seppälä | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: com.companyname.java.instanceof | |
pattern: instanceof | |
message: instanseofを使わなくて済むように設計しましょう。instanceofについての詳細は https://www.slideshare.net/HiroshiSaito1/deep-dive-into-instanceof を見てください | |
glob: | |
- "**/*.java" | |
fail: | |
- if("Hello, world!" instanceof String){} | |
pass: | |
- if("Hello, world".getClass().getCanonicalName() == "java.lang.String"){} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: review.sider.html.target-blank | |
pattern: | |
- 'target="_blank"' | |
- "target='_blank'" | |
- 'target: "_blank"' | |
- "target: '_blank'" | |
glob: | |
- "**/*.{slim,erb,html,jsx,tsx}" | |
message: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- id: deprecated | |
pattern: | |
token: "@available(" | |
case_sensitive: false | |
message: The method is deprecated. Could you use new version? | |
glob: | |
- "**/*.h" | |
- "**/*.m" | |
- "**/*.swift" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
# Base(パターンマッチさせやすくする為のルールです) | |
- id: com.example.base.1 | |
pattern: | |
regexp: (\S==\S|\S=\S) | |
message: | |
==や=の前後には半角空白を入れてください。 | |
glob: | |
- "**/*.java" | |
fail: |
OlderNewer