Showing 1,278 of 4,906 total issues
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
const pinned = !!columnId;
const emptyMessage = <FormattedMessage id='empty_column.bookmarked_statuses' defaultMessage="You don't have any bookmarked posts yet. When you bookmark one, it will show up here." />;
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;
const pinned = !!columnId;
const emptyMessage = <FormattedMessage id='empty_column.favourited_statuses' defaultMessage="You don't have any favorite posts yet. When you favorite one, it will show up here." />;
Function configFromEnv
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function configFromEnv(env) {
const redisNamespace = env.REDIS_NAMESPACE;
// These options apply for both REDIS_URL based connections and connections
// using the other REDIS_* environment variables:
Function ReplyIndicator
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ReplyIndicator = () => {
const inReplyToId = useSelector(state => state.getIn(['compose', 'in_reply_to']));
const status = useSelector(state => state.getIn(['statuses', inReplyToId]));
const account = useSelector(state => state.getIn(['accounts', status?.get('account')]));
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { notification } = this.props;
const account = notification.get('account');
const displayNameHtml = { __html: account.get('display_name_html') };
const link = <bdi><Link className='notification__display-name' href={`/@${account.get('acct')}`} title={account.get('acct')} data-hover-card-account={account.get('id')} to={`/@${account.get('acct')}`} dangerouslySetInnerHTML={displayNameHtml} /></bdi>;
Function ActionBar
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ActionBar = () => {
const dispatch = useDispatch();
const intl = useIntl();
const handleLogoutClick = useCallback(() => {
Function push_subscriptions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function push_subscriptions(state = initialState, action) {
switch(action.type) {
case STORE_HYDRATE: {
const push_subscription = action.state.get('push_subscription');
Method remotable_attachment
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def remotable_attachment(attachment_name, limit, suppress_errors: true, download_on_assign: true, attribute_name: nil)
attribute_name ||= :"#{attachment_name}_remote_url"
define_method(:"download_#{attachment_name}!") do |url = nil|
url ||= self[attribute_name]
Method elastic_search_query
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def elastic_search_query
{
function_score: {
query: {
multi_match: {
Method reset_relationships
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def reset_relationships(username)
fail_with_message 'Please specify either --follows or --followers, or both' unless options[:follows] || options[:followers]
account = Account.find_local(username)
Function conversations
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function conversations(state = initialState, action) {
switch (action.type) {
case CONVERSATIONS_FETCH_REQUEST:
return state.set('isLoading', true);
case CONVERSATIONS_FETCH_FAIL:
Function SensitiveButton
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const SensitiveButton = () => {
const intl = useIntl();
const spoilersAlwaysOn = useAppSelector((state) => state.local_settings.getIn(['always_show_spoilers_field']));
const spoilerText = useAppSelector((state) => state.compose.get('spoiler_text'));
Function scrollableContent
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
statusIds.map((statusId, index) => {
switch(statusId) {
case TIMELINE_SUGGESTIONS:
return (
<InlineFollowSuggestions
Function conversations
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function conversations(state = initialState, action) {
switch (action.type) {
case CONVERSATIONS_FETCH_REQUEST:
return state.set('isLoading', true);
case CONVERSATIONS_FETCH_FAIL:
Method from_notifications
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.from_notifications(notifications, pagination_range: nil, grouped_types: nil)
return [] if notifications.empty?
grouped_types = grouped_types.presence&.map(&:to_sym) || Notification::GROUPABLE_NOTIFICATION_TYPES
Method process_attachments
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def process_attachments
return [] if @object['attachment'].nil?
media_attachments = []
Method build_status_translation
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def build_status_translation(translations)
status_translation = Translation.new(
detected_source_language: translations.first&.detected_source_language,
language: @target_language,
provider: translations.first&.provider,
Method make
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def make
return File.open(@file.path) unless needs_convert?
dst = TempfileFactory.new.generate([@basename, @format ? ".#{@format}" : @current_format].join)
Function handleKeyDown
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(e: React.KeyboardEvent) => {
const selectedOptionValue = options[selectedOption];
switch (e.key) {
case 'ArrowDown':
Function handleKeyDown
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(e: React.KeyboardEvent) => {
const selectedOptionValue = options[selectedOption];
switch (e.key) {
case 'ArrowDown':