Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web-console: fix alerts from lgtm #8346

Merged
merged 8 commits into from
Aug 21, 2019
Merged

Conversation

mcbrewster
Copy link
Contributor

LGTM is reporting a bunch of alerts this should fix a bunch of them.

  • removes un used variables
  • prevents setting state directly
  • removes useless checks

@lgtm-com
Copy link

lgtm-com bot commented Aug 20, 2019

This pull request introduces 1 alert and fixes 10 when merging f5abf1d into cb1339e - view on LGTM.com

new alerts:

  • 1 for Unsupported state update in lifecycle method

fixed alerts:

  • 7 for Unused or undefined state property
  • 3 for Useless conditional

@lgtm-com
Copy link

lgtm-com bot commented Aug 20, 2019

This pull request introduces 2 alerts and fixes 11 when merging 3ee410c into 6fa22f6 - view on LGTM.com

new alerts:

  • 1 for Direct state mutation
  • 1 for Unsupported state update in lifecycle method

fixed alerts:

  • 7 for Unused or undefined state property
  • 3 for Useless conditional
  • 1 for Direct state mutation

@lgtm-com
Copy link

lgtm-com bot commented Aug 20, 2019

This pull request fixes 10 alerts when merging 85c5d77 into 14a4238 - view on LGTM.com

fixed alerts:

  • 6 for Unused or undefined state property
  • 3 for Useless conditional
  • 1 for Direct state mutation

@lgtm-com
Copy link

lgtm-com bot commented Aug 21, 2019

This pull request fixes 23 alerts when merging 3be0d94 into d5a1967 - view on LGTM.com

fixed alerts:

  • 10 for Potentially inconsistent state update
  • 7 for Unused or undefined state property
  • 3 for Useless conditional
  • 1 for Direct state mutation
  • 1 for Potentially unsafe external link
  • 1 for Unused variable, import, function or class

@@ -21,6 +21,7 @@ import axios from 'axios';
import copy from 'copy-to-clipboard';
import React from 'react';

import { Loader } from '..';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you not import from ..

if (!columnTree) return null;
const currentSchemaSubtree =
columnTree[selectedTreeIndex > -1 ? selectedTreeIndex : 0].childNodes;
console.log(currentSchemaSubtree);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woops

@@ -67,9 +67,10 @@ export class StackedBarChart extends React.Component<StackedBarChartProps, Stack

componentWillReceiveProps(nextProps: StackedBarChartProps): void {
if (nextProps !== this.props) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure this if statement does nothing

@@ -19,7 +19,6 @@
const process = require('process');
const path = require('path');
const postcssPresetEnv = require('postcss-preset-env');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than totally removing this please tie it to an env variable

@vogievetsky
Copy link
Contributor

LGTM after CI 👍

plugins: [
// new BundleAnalyzerPlugin()
],
plugins: process.env.BUNDLE_ANALYZER_PLUGIN === 'TRUE' ? [new BundleAnalyzerPlugin()] : [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vogievetsky is this what you wanted? I documented it in both the build script and the read me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@lgtm-com
Copy link

lgtm-com bot commented Aug 21, 2019

This pull request fixes 23 alerts when merging 90f06f6 into d5a1967 - view on LGTM.com

fixed alerts:

  • 10 for Potentially inconsistent state update
  • 7 for Unused or undefined state property
  • 3 for Useless conditional
  • 1 for Direct state mutation
  • 1 for Potentially unsafe external link
  • 1 for Unused variable, import, function or class

@clintropolis clintropolis merged commit e4aa7fb into apache:master Aug 21, 2019
@vogievetsky vogievetsky deleted the upgrade-from-b branch August 21, 2019 03:43
@clintropolis clintropolis added this to the 0.16.0 milestone Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants