Showing 20 of 511 total issues
Function render
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const stepSize = (100 / (this.props.script).length)
const steps = [
{
selector: '[data-tour="step0"]',
Function Instructions
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Instructions() {
return (
<div className="container">
<div className="row">
<div className="col-12">
Function render
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { Line } = Progress;
return (
<Fragment>
Function renderActions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderActions() {
if (this.state.successfullUploaded) {
return (
<Button
style={{
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
let { location } = this.props;
let isModal = !!(
location.state &&
Function SigningSteps
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SigningSteps(history) {
let url = history.history.location.pathname;
let current = 0;
switch (url) {
Function HowItWorks
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function HowItWorks() {
return (
<Section id="como-funciona">
<FlexboxGrid justify="space-around">
<FlexboxGrid.Item colspan={15}>
Method gettext
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def gettext(document_photo)
client = Aws::Rekognition::Client.new({
region: Rails.application.credentials.dig(:aws, :region),
credentials: Aws::Credentials.new(
Rails.application.credentials.dig(:aws, :access_key_id),
Function LandingPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LandingPage = () => {
const [loginModal, setLoginModal] = useState(false);
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
return (
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div>
<div className="show-fake-browser navbar-page">
<Container>
Method gettext
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def gettext(document_photo)
client = Aws::Rekognition::Client.new({
region: Rails.application.credentials.dig(:aws, :region),
credentials: Aws::Credentials.new(
Rails.application.credentials.dig(:aws, :access_key_id),
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sendRequest
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sendRequest(file) {
return new Promise((resolve, reject) => {
const req = new XMLHttpRequest();
req.upload.addEventListener("progress", event => {
Function registerValidSW
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
Function componentDidMount
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
// instantiate Video.js
this.player = videojs(this.videoNode, videoJsOptions, () => {
// print version information at startup
Function Pricing
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Pricing() {
return (
<PricingSection id="precos">
<FlexboxGrid justify="center">
<FlexboxGrid.Item colspan={15}>
Function handleUploadImages
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function* handleUploadImages() {
const { images } = yield select(state => state.record);
const selectedImages = shuffle(images).slice(0, 3);
Function upload
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function upload(state = initial, action) {
switch (action.type) {
case SET_VIDEO_UPLOAD_STATUS:
return {
...state,
Function Navbar
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Navbar() {
return (
<header>
<nav className="navbar navbar-expand-lg navbar-dark bg-info py-4">
<div className="container">
Function _SecondRow
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const _SecondRow = () => {
return (
<div>
<SecondRow>
<AboutDiv>
Method what_document?
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def what_document? ()
attrs = {
image: {
s3_object: {
bucket: Rails.application.credentials[Rails.env.to_sym][:aws][:bucket],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"