Giter Site home page Giter Site logo

Some false positives about capp_lint HOT 8 CLOSED

aparajita avatar aparajita commented on May 20, 2024
Some false positives

from capp_lint.

Comments (8)

aparajita avatar aparajita commented on May 20, 2024

Thanks, I'll look into it.

from capp_lint.

klaaspieter avatar klaaspieter commented on May 20, 2024

Some more false positives:

Specifying a category (happens when copy pasting Cocoa)
acceptDrop:(id)theDragInfo

Incorrect indentation (I'd like to have some freedom here)

var highlightedBezelColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:[
    [[CPImage alloc] initWithContentsOfFile:highlightedLeftImage size:CGSizeMake(3.0, 30.0)],
    [[CPImage alloc] initWithContentsOfFile:highlightedFillImage size:CGSizeMake(1.0, 30.0)],
    [[CPImage alloc] initWithContentsOfFile:highlightedRightImage size:CGSizeMake(12.0, 30.0)]
] isVertical:NO]];

Declaring a property

 @outlet CPTableView _listsTableView @accessors(property=listsTableView);

from capp_lint.

aparajita avatar aparajita commented on May 20, 2024

acceptDrop:(id)theDragInfo

What is the error you are getting?

Incorrect indentation (I'd like to have some freedom here)

You'll have to discuss it on the list to get some concensus, Alexander agreed with me that everything should be indented at least to the first character of the identifier.

Declaring a property

Will be fixed in the next commit, coming soon.

from capp_lint.

klaaspieter avatar klaaspieter commented on May 20, 2024

acceptDrop:(id)theDragInfo

What is the error you are getting?

comparison operator without surrounding spaces.

from capp_lint.

aparajita avatar aparajita commented on May 20, 2024

Then the method declaration must be malformed (perhaps missing the "-" or return type), because that check is skipped for well-formed method declarations.

from capp_lint.

klaaspieter avatar klaaspieter commented on May 20, 2024

The method declaration is divider over multiple lines. My guess is that it properly skips the first line of the method declaration but doesn't for any subsequent lines.

from capp_lint.

klaaspieter avatar klaaspieter commented on May 20, 2024

CPSplitView lines 628 to 634.

 if (index + 1 == count)
    viewFrame.size[_sizeComponent] = bounds.size[_sizeComponent] - viewFrame.origin[_originComponent];
else if (totalSizableSpace && isSizable && lastSizableIndex === index)
    viewFrame.size[_sizeComponent] = MAX(0, ROUND([view frame].size[_sizeComponent] + remainingFlexibleSpace))
else if (isSizable || !totalSizableSpace)
{
    viewFrame.size[_sizeComponent] = MAX(0, ROUND(ratio * [view frame].size[_sizeComponent]));
    remainingFlexibleSpace -= (viewFrame.size[_sizeComponent] - [view frame].size[_sizeComponent]);
}
else if (totalSizableSpace && !isSizable)
    viewFrame.size[_sizeComponent] = [view frame].size[_sizeComponent];

from capp_lint.

aparajita avatar aparajita commented on May 20, 2024

Fixed. In actual fact it isn't a false positive, it's just wrongly labeled. The code after the var block is not outdented as it should be. This is specifically flagged in the latest version on master.

from capp_lint.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.