Showing 77 of 131 total issues
Prefer exists?(id: params[:comment_id])
over where(id: params[:comment_id]).exists?
. Open
Comment.where(id: params[:comment_id]).exists?)
- Exclude checks
Prefer string interpolation to string concatenation. Open
' | ' + t('devise.invitations.edit.header')
- Read upRead up
- Exclude checks
Prefer string interpolation to string concatenation. Open
' | ' + title_content
- Read upRead up
- Exclude checks
Remove explicit presence validation for user_id
. Open
validates :user_id, :name, presence: true
- Exclude checks
Parsing error: Unexpected token (4:12) Open
import type { Props as InputProps } from 'components/Input/utils';
- Read upRead up
- Exclude checks
Parsing error: 'Const declarations' require an initialization value. (4:17) Open
export const Logo: any = LogoFactory();
- Read upRead up
- Exclude checks
Redundant all
detected. Open
total: current_user.moments.all.count,
- Exclude checks
Redundant all
detected. Open
objs = obj.where(user_id: data.user_id).all.order('created_at DESC')
- Exclude checks
Remove explicit presence validation for reportee_id
. Open
validates :reportee_id, presence: true
- Exclude checks
Prefer keyword arguments for arguments with a boolean default value; use css: false
instead of css = false
. Open
def inline_file(path, css = false)
- Read upRead up
- Exclude checks
Move locale texts to the locale files in the config/locales
directory. Open
message: 'There is already a request enqueued for this user.'
- Exclude checks
Prefer string interpolation to string concatenation. Open
t('shared.meeting_info.attending') + ' ' + link_to( t('common.actions.leave'), leave_meetings_path(meeting_id: id)
- Read upRead up
- Exclude checks
Move locale texts to the locale files in the config/locales
directory. Open
message: 'There is already a request with this request_id.'
- Exclude checks
Prefer keyword arguments for arguments with a boolean default value; use include_allies: false
instead of include_allies = false
. Open
def get_stories(user, include_allies = false)
- Read upRead up
- Exclude checks
Convert if-elsif
to case-when
. Open
if tag.is_a?(Mood) get_moods_from_data(data, tag) elsif tag.is_a?(Category) get_categories_from_data(data, tag) elsif tag.is_a?(Strategy)
- Read upRead up
- Exclude checks
Remove explicit presence validation for commentable_id
. Open
validates :commentable_id, :comment_by, presence: true
- Exclude checks
Remove explicit presence validation for meeting_id
/user_id
. Open
validates :meeting_id, :user_id, presence: true
- Exclude checks
Use atomic file operation method FileUtils.mkdir_p
. Open
Dir.mkdir(DEFAULT_FILE_PATH) unless File.exist?(DEFAULT_FILE_PATH)
- Read upRead up
- Exclude checks
Use moment.count.positive?
instead of moment.count > 0
. Open
next unless moment.count > 0
- Read upRead up
- Exclude checks