Showing 2,441 of 6,157 total issues
File sections.tsx
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
File Pie.stories.tsx
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
Function extremes
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
extremes(mode, formatter = usFmt) {
return function ([attr]) {
return function (data) {
return {
val: null,
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { className, width, height, position, renderChart, renderLegend } =
this.props;
const isHorizontal = position === 'left' || position === 'right';
Consider simplifying this complex logical expression. Open
Open
if (annotationData) {
// Event annotations
activeAnnotationLayers
.filter(
x =>
Function isControlValueCompatibleWithDatasource
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const isControlValueCompatibleWithDatasource = (
datasource: Dataset,
controlState: ControlState,
value: any,
) => {
Function renderWell
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderWell = () => {
let partitions;
let metadata;
if (tableData.partitions) {
let partitionQuery;
Consider simplifying this complex logical expression. Open
Open
if (sqlLab.queryEditors.length === 0) {
// migration was successful
localStorage.removeItem('redux');
} else {
unsavedQueryEditor = sqlLab.unsavedQueryEditor || unsavedQueryEditor;
Consider simplifying this complex logical expression. Open
Open
if (search || visualize || csv) {
let { data } = query.results;
if (cache && query.cached) {
data = cachedData;
}
Function useChildElementTruncation
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useChildElementTruncation = () => {
const [elementsTruncated, setElementsTruncated] = useState(0);
const [hasHiddenElements, setHasHiddenElements] = useState(false);
const elementRef = useRef<HTMLDivElement>(null);
const plusRef = useRef<HTMLDivElement>(null);
Function runningStat
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
runningStat(mode = 'mean', ddof = 1, formatter = usFmt) {
return function ([attr]) {
return function () {
return {
n: 0.0,
Function syncMetadata
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
syncMetadata() {
const { datasource } = this.state;
const params = {
datasource_type: datasource.type || datasource.datasource_type,
database_name:
Function syncQueryEditor
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function syncQueryEditor(queryEditor) {
return function (dispatch, getState) {
const { tables, queries } = getState().sqlLab;
const localStorageTables = tables.filter(
table => table.inLocalStorage && table.queryEditorId === queryEditor.id,
Function renderList
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderList() {
if (this.props.value.length === 0) {
return <div className="text-muted">{this.props.placeholder}</div>;
}
const Control = controlMap[this.props.controlName];
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
children,
className,
orientation,
Function handleContextMenu
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(
e: MouseEvent,
colKey: (string | number | boolean)[] | undefined,
rowKey: (string | number | boolean)[] | undefined,
dataPoint: { [key: string]: string },
Function initialize
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const initialize = (withValidator = false) => {
if (withValidator) {
return renderHook(
() =>
useAnnotations({
Function func
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
func: (editor: AceEditor['editor']) => {
if (!editor.getValue().trim()) {
return;
}
const session = editor.getSession();
Function loadFileMetadata
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const loadFileMetadata = (file: File) => {
const fields = form.getFieldsValue();
const mergedValues = { ...defaultUploadInfo, ...fields };
const formData = new FormData();
formData.append('file', file);
Function PathChartViz
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const PathChartViz = () => {
const theme = useTheme();
return (
<SuperChart
chartType="deck_path"