Showing 1,278 of 4,906 total issues
Function checkCanvasReliability
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const checkCanvasReliability = () => new Promise((resolve, reject) => {
switch(_browser_quirks['canvas-read-unreliable']) {
case true:
reject('Canvas reading unreliable');
break;
Function isLinkMisleading
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const isLinkMisleading = (link) => {
let linkTextParts = [];
// Reconstruct visible text, as we do not have much control over how links
// from remote software look, and we can't rely on `innerText` because the
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { announcements, intl } = this.props;
const { index } = this.state;
if (announcements.isEmpty()) {
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { intl, hasUnread, columnId, multiColumn, onlyMedia } = this.props;
const pinned = !!columnId;
return (
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { intl, columnId, hasUnread, multiColumn, onlyMedia, onlyRemote, allowLocalOnly } = this.props;
const pinned = !!columnId;
return (
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { alt, lang, src, width, height, onClick, zoomedIn } = this.props;
const { loading } = this.state;
const className = classNames('image-loader', {
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis } = this.props;
const title = intl.formatMessage(messages.emoji);
const { active, loading, placement } = this.state;
Function onChange
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onChange (path, checked) {
if (path[0] === 'push') {
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
dispatch(requestBrowserPermission((permission) => {
if (permission === 'granted') {
Function settings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function settings(state = initialState, action) {
switch(action.type) {
case STORE_HYDRATE:
return hydrate(state, action.state.get('settings'));
case NOTIFICATIONS_FILTER_SET:
Function onChange
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onChange (path, checked) {
if (path[0] === 'push') {
if (checked && typeof window.Notification !== 'undefined' && Notification.permission !== 'granted') {
dispatch(requestBrowserPermission((permission) => {
if (permission === 'granted') {
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { announcements, intl } = this.props;
const { index } = this.state;
if (announcements.isEmpty()) {
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { alt, lang, src, width, height, onClick, zoomedIn } = this.props;
const { loading } = this.state;
const className = classNames('image-loader', {
Function settings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function settings(state = initialState, action) {
switch(action.type) {
case STORE_HYDRATE:
return hydrate(state, action.state.get('settings'));
case NOTIFICATIONS_FILTER_SET:
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const { intl, onPickEmoji, onSkinTone, skinTone, frequentlyUsedEmojis } = this.props;
const title = intl.formatMessage(messages.emoji);
const { active, loading, placement } = this.state;
Method attempt_oembed
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def attempt_oembed
service = FetchOEmbedService.new
url_domain = Addressable::URI.parse(@url).normalized_host
cached_endpoint = Rails.cache.read("oembed_endpoint:#{url_domain}")
Method parallelize_with_progress
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parallelize_with_progress(scope)
fail_with_message 'Cannot run with this concurrency setting, must be at least 1' if options[:concurrency] < 1
reset_connection_pools!
Method create
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create(username)
role_id = nil
if options[:role]
role = UserRole.find_by(name: options[:role])
Method import
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import(path)
imported = 0
skipped = 0
failed = 0
category = options[:category] ? CustomEmojiCategory.find_or_create_by(name: options[:category]) : nil
Function handleContentRef
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(node: HTMLDivElement | null) => {
if (!node) {
return;
}
Function handleContentRef
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(node: HTMLDivElement | null) => {
if (!node) {
return;
}