filetree icon indicating copy to clipboard operation
filetree copied to clipboard

Pharo5.0 code critic errors/issues

Open dalehenrich opened this issue 8 years ago • 0 comments

Validation Report: 15456 Load latest version of metacello
Failure
8 Errors 9 Warnings
Validation Setup
Image Version   50212
OS Version  an UnixPlatform
VM Version  NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Apr 2 2015 NBCogit NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Apr 2 2015 https://github.com/pharo-project/pharo-vm.git Commit: 32d18ba0f2db9bee7f3bdbf16bdb24fe4801cfc5 Date: 2015-03-24 11:08:14 +0100 By: Esteban Lorenzano Jenkins build #14904
Loaded Case     CASE 15456 configuration of PharoMetacello (pharo50)
Issue Status    Work Needed (Failing Test)
Jenkins Job jenkins-Pharo-5.0-Issue-Validator-10033
Errors and Failures

    References an undeclared variable 2
    Checks for references to a undeclared variables

    MetacelloPlatform>>#fileDirectoryClass, MetacelloPlatform>>#suspendSystemUpdateEventsDuring:
    Unclassified methods 12
    All methods should be put into a protocol (method category) for better readability.

    MCFileTreeRepository>>#allFileNames, MCFileTreeRepository>>#allFileNamesForVersionNamed:, MCFileTreeRepository>>#basicStoreVersion:, MCFileTreeRepository>>#cachedFileNames, MCFileTreeRepository>>#canReadFileNamed:, MCFileTreeRepository>>#directory:, MCFileTreeRepository>>#filterFileNames:forVersionNamed:, MCFileTreeRepository>>#flushCache, MCFileTreeRepository>>#goferVersionFrom:, MCFileTreeRepository>>#versionFromFileNamed:, MCFileTreeRepository>>#versionInfoFromFileNamed:, MCFileTreeRepository>>#versionNameFromFileName:, MCFileTreeRepository>>#writeRepositoryProperties
    No class comment 1
    Classes should have comments to explain their purpose, collaborations with other classes, and optionally provide examples of use.

    MCFileTreeFileSystemUtils
    Methods equivalently defined in superclass
    Check for methods that are equivalent to their superclass methods.

    MCFileTreePackageStructureStWriter>>#writeClassDefinition:
    Method just sends super message
    Check for methods that just forward the message to its superclass.

    MCBitbucketRepository class>>#cacheDirectoryPath, MCGitHubRepository class>>#cacheDirectoryPath
    Subclass responsibility not defined
    Checks that all methods which send #subclassResponsibility, which indicates that they are abstract, are defined in all leaf classes.

    MetacelloIssueTestCase>>#projectName, MetacelloPlatform>>#downloadJSON:username:pass:, MetacelloPlatform>>#downloadZipArchive:to:
    Temporary variables not read AND written
    Checks that all temporary variables are both read and written.

    MCFileTreeStCypressReader>>#validateExtensionMethodCategory:for:selector:, MetacelloPharoCommonPlatform>>#downloadBasicFile:to:username:pass:
    MCModel2MTModelVisitorTest>>#testVisitXMLParserConfigurationWithVersion101

Warnings

    Refers to class name instead of "self class"
    Checks for direct reference to classes themselves.

    MCGitBasedNetworkRepository>>#resolveProjectVersionPattern:, MetacelloScriptingResource>>#baselineIssue215:, MetacelloScriptingResource>>#configuration098Issue215:, MetacelloScriptingResource>>#lockConfiguration15:
    Sends "questionable" message 1
    Check methods that send messages that perform low level things.

    ConfigurationOfGofer class>>#ensureMetacello, MCGitBasedNetworkRepository>>#canUpgradeTo:, MCGitBasedNetworkRepository>>#hasNoLoadConflicts:, MetacelloProjectRegistry>>#registerProjectRegistration:
    Sends different super message
    Checks for methods whose source sends a different super message.

    GoferReference>>#matchesMetacelloGoferPackage:
    Messages sent but not implemented
    Checks for messages that are sent by a method, but no class in the system implements such a message. Further checks if messages sent to self or super exist in the hierarchy, since these can be statically typed. Reported methods will certainly cause a doesNotUnderstand: message when they are executed.

    GoferReference>>#matchesMetacelloGoferPackage:, MCFileTreeRepository class>>#urlAsFileReference:
    Long methods 2
    Returns all methods that have #longMethodSize number of statements. This check counts statements, not lines.

    BaselineOfMetacello>>#baseline:, GoferReference>>#matchesMetacelloGoferPackage:, MCFileTreeStCypressReader>>#addMethodDefinitionsForClass:methodProperties:in:extensionMethod:, MCGitBasedNetworkRepository class>>#parseLocation:version:, MCGitBasedNetworkRepository class>>#parseProjectVersionField:desc:versionDelim:, MetacelloMCVersionSpec>>#packageSpecsInLoadOrderForMap:, MetacelloPackagesSpec>>#packageSpecsInLoadOrderFor:, MetacelloPackagesSpec>>#slideIn:spec:baseIndex:seen:firstTime:for:, MetacelloPackagesSpec>>#sortPackageSpecs:packageSpec:groupLoops:for:, MetacelloProjectRegistry>>#registerProjectRegistration:, MetacelloScriptingTestCase>>#setUpRepositories
    Uses "size = 0", "= nil" instead of "isEmpty" and "isNil"
    Checks for code using equality tests instead of the message sends.

    ConfigurationOfGofer class>>#lastMetacelloVersionLoad, GoferReference>>#matchesMetacelloGoferPackage:, MCGitBasedNetworkRepository>>#projectVersion, MetacelloGenericProjectSpec>>#mergeRepositoriesSpec:, MetacelloPackagesSpec>>#packageSpecsInLoadOrderFor:, MetacelloScriptingStandardTestHarness>>#validateExpectedConfigurationClassName:expectedConfigurationVersion:expectedConfigurationRepository:expectedBaselineClassName:expectedBaselineVersion:expectedBaselineRepository:, MetacelloScriptingStandardTestHarness>>#verifyPackageNotLoaded:
    Uses detect:ifNone: instead of contains:
    Checks for the common code fragment: "(aCollection detect: [:each | 'some condition'] ifNone: [nil]) ~= nil".

    BaselineOfMetacello>>#reprimeRegistryIssue197
    Empty exception handler
    Empty exception handler blocks hide potential bugs. The situation should be handled in a more robust way.

    MetacelloPlatform>>#clearPackageCache
    Uses or's instead of a searching literal
    Checks for repeated literal equalitity tests that should rather be implemented as a search in a literal collection.

    GoferReference>>#matchesMetacelloGoferPackage:, MCFileTreeStCypressReader>>#addMethodDefinitionsForClass:methodProperties:in:extensionMethod:

Console Output

dalehenrich avatar Aug 07 '15 16:08 dalehenrich