Showing 2,441 of 6,157 total issues
Function renderEditor
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderEditor(inModal = false) {
const minLines = inModal ? 40 : this.props.minLines || 12;
if (this.props.language) {
const style = {
border: `1px solid ${this.props.theme.colors.grayscale.light1}`,
Function prompting
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async prompting() {
this.option('skipInstall');
this.answers = await this.prompt([
{
Function import_dashboard
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def import_dashboard(
# pylint: disable=too-many-locals,too-many-statements
dashboard_to_import: Dashboard,
dataset_id_mapping: Optional[dict[int, int]] = None,
import_time: Optional[int] = None,
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { scaleFactor } = this.state;
const { width, height, encoding, sliceId, colorScheme } = this.props;
const { words } = this.state;
Function contextmenu
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
contextmenu: async eventParams => {
if (onContextMenu) {
eventParams.event.stop();
const { data, treePathInfo } = eventParams;
const { records } = data;
Function commonLayerProps
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function commonLayerProps(
formData: QueryFormData,
setTooltip: (tooltip: TooltipProps['tooltip']) => void,
setTooltipContent: (content: JsonObject) => ReactNode,
onSelect?: (value: JsonValue) => void,
Function mapOption
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(option: OptionValueType) => {
// already a AdhocFilter, skip
if (option instanceof AdhocFilter) {
return option;
}
Function onSave
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSave = () => {
const dashboards = dashboardsToTag.map(dash => ['dashboard', dash.value]);
const charts = chartsToTag.map(chart => ['chart', chart.value]);
const savedQueries = savedQueriesToTag.map(q => ['query', q.value]);
Function datasetReducer
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function datasetReducer(
state: DatasetObject | null,
action: DSReducerActionType,
): Partial<DatasetObject> | Schema | null {
const trimmedState = {
Function getRowsWithoutRoles
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getRowsWithoutRoles = () => {
const jsonMetadataObj = getJsonMetadata();
const hasCustomLabelsColor = !!Object.keys(
jsonMetadataObj?.label_colors || {},
).length;
Function computeEndTimeFromGranularity
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function computeEndTimeFromGranularity(
time: Date,
granularity: TimeGranularity,
useLocalTime: boolean,
) {
Function computeCustomDateTime
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const computeCustomDateTime = (
dttm: string,
grain: string,
grainValue: number,
) => {
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__( # pylint: disable=too-many-arguments
Function raise_for_access
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def raise_for_access(
Function actions.REMOVE_QUERY_EDITOR
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
[actions.REMOVE_QUERY_EDITOR]() {
const queryEditor = {
...action.queryEditor,
...(action.queryEditor.id === state.unsavedQueryEditor.id &&
state.unsavedQueryEditor),
Function UNSAFE_componentWillReceiveProps
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
UNSAFE_componentWillReceiveProps(nextProps) {
const maxIndex = Math.max(0, nextProps.component.children.length - 1);
const currTabsIds = this.props.component.children;
const nextTabsIds = nextProps.component.children;
Function constructor
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('./EchartsMixedTimeseries'),
Function constructor
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('../EchartsTimeseries'),
Function getCrossFilterDataMask
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(treePathInfo: TreePathInfo[]) => {
const treePath = extractTreePathInfo(treePathInfo);
const name = treePath.join(',');
const selected = Object.values(selectedValues);
let values: string[];
Function useOverflowDetection
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useOverflowDetection = (flexGap: number) => {
const symbolContainerRef = useRef<HTMLDivElement>(null);
const wrapperRef = useRef<HTMLDivElement>(null);
const [isOverflowing, setIsOverflowing] = useState(false);