hpi-swa-teaching / swalint Goto Github PK
View Code? Open in Web Editor NEWCode Critics Tool for Squeak
License: MIT License
Code Critics Tool for Squeak
License: MIT License
Referenced by their table entry:
As a developer, I'd like to see markers in the system browser hinting at the places where linter tests have gone off. Moreover, when hovering over such a marker, a tooltip should show up and display which linter test(s) has/have failed there.
In combination with #14, short descriptions or summaries of failed linter tests could be displayed inside the tooltip.
In combination with #19, these markers could update automatically when the user changes code.
In combination with #15, suggested solutions for the problem could be displayed in each tooltip.
As a SWA student or at least someone trying to write good software but not being into testing that deep I want to have the liter tests grouped or ordered in a way that I can easily find "easy" and intuitively useful tests, so that I do not have to be browse threw all different categories and tests and waste a lot of time and enjoyment with SWALint.
Since there is already a LinterTest, that does the same but without emtpy lines, either remove this test or update name + description.
This LinterTest does not do what it should. Does not actually call (any?) rule.
Fix it!
This does not check every class. It checks for isMeta, which might be the reason.
Write a test (with example from test description) and make it work.
wrap
^#word_char
Heading of selection browser is "Issues for selected tests on selected objects [X]" when you open it. After clicking on an other method the heading is "Implementors of X"
As a user running multiple and long tests, I would like to be able to still work in my image while linter tests are going on to increase my productivity.
At least I would like to be able to cancel the linting.
The import in the DevelopBasedOn2015 branch (https://github.com/hpi-swa-teaching/SwaLint/tree/developBasedOn2015) fixes the UI errors but does not work with the actual testing framework. That has to be fixed.
Sometimes you call methods, that are deprecated, but are unaware of it. You can enable deprecation warnings, but they will only trigger if that path of code is executed.
We could check if the code does directly call a method that is marked as deprecated (which is not perfect, but does not require actually executing that path of code).
There is already a similar LinterTest, but it seems to be related to Pharao and I do not understand what it is actually doing. What are wellKnownClasses?
It does not recognize A+B/C.
Add a test and implement it.
Description says: "Check for code that checks that a collection is non-empty before sending it an iteration message (e.g., do:, collect:, etc.). Since the collection iteration messages work for empty collections, we do not need to clutter up our method with the extra size check.".
But it does not find "collection isEmpty not ifFalse: [collection do: [:each | ...]]"
Enhance it. Test is existing, maybe enhance it further!?
At least with the magic numbers test (but most likely with few others as well) you get the "Error: symbols can not be modified" when trying to lint class with methods with primitives in it.
As a development that wants to have fix coding standards for their team, we would like the linter SmalltalkCI integration to check for a defined set of tests (the coding standards) and reject the code change if it does not meet them, to improve our code quality. It would be great if that is more than just "Dot after return consistency".
Therefore we should also think about a group of tests which are only responsible for those coding standards.
It seems like the combination of our test environment (abstract test classes with inherited tests) results in different test results:
As a user I would like to be able to scroll through the linter test results with arrow keys to be able to have a more precise look on the results.
As a developer, I'd like the linter to continuously lint my code and show the results when some linter tests fail, i.e., in a continuously open status window. This way, I don't need to run the linter over and over again manually. Instead, I immediately see when a linter test goes off and can fix the problem just after I introduced it.
Currently, it does find "add: each" but not "add: (5+each)".
Test already existing, but commented out. Comment it in, please.
Enhance the LinterTest to make the test green. A way of doing this could be ignoring special Characters (Character isSpecial: +-*/) as message selectors.
Redundant code
Missing class comments
Unclassified methods
Long or complex methods
Are all duplications or have duplications.
Currently, dead code is a duplicate of smallLintClassNotReferenced.
Instead of removing it, it would be nice to detect the following code as dead code:
"...
false ifTrue: [someDeadCode].
true ifTrue: [someOtherDeadCode]."
Write tests and implement it.
As a user having many tests and a huge code base that started the linting by mistake, which runs very long, I would like to be able to cancel the linting.
Find another way to do the same thing that does not use dependencies.
Completed when travis is green again.
The results of some linter tests seem not be to be listed in the result screen of the linter. Especially the tests "Class variable capitalization" (line 14), "Instance variable capitalization" (l. 22), "No class comment" (l. 72), "Variables not referenced" (l. 86) and "Has class instance variables but no initialize method" (l. 13) seem to be affected.
(At least) they share the attribute that they do not have the basic returnClass for the result, their types are either RBClassEnviroment or RBVariableEnviroment,
This LinterTest does not do what it should.
Accepted when test succeeds.
Currently, it does not work, should do: "Checks that all subclassResponsibility
methods are defined in all leaf classes."
Write test coverage for it and fix it.
The reference browser has an unused category "search results" which does not seem necessary. There also exists the "--search results--" category which correctly shows the results of a search
As a developer, I’d like to be able to add tests for my own code, so I have the option to softly enforce its usage. Ideally, these tests can be distributed with my code.
After having "fixed" #6, that results in non-failing literal values and method selectors tests, it seems like the liter values and the magic numbers test do the same. Have a look at the output of the linter of only running the literal values and the magic numbers test
all results doubled and in one category.
However, when trying to browse the result, the same problem as mentioned in #1 (but obviously not dead code, but magic numbers as the second word) is raised.
Sometimes when trying to select one item from a list in the user interface, the linter will select another item too. If you try again, the same misbehaviour will continue.
Since we do not know how to reproduce it, we cannot test it. So find out how to reproduce it first.
Try to do the following to reproduce the error:
It would be nice to have a button to reset SwaLint. If you get a new version of SwaLint, you might need to reset it. If there's no button, you'll forget and things won't work.
As a user, that wants to define customized linter tests, I would like to have a clear interface for linter test , I would like to add, to be able to add my own linting rules.
Therefore the test interface of the SwaLint-Plugins classes should be unified (the SmallLint test use a different way, then the other classes (they address RB classes)) and not need a registration of every part of the test.
As a new user, I’d like to be able to view the criteria for a test, or at least a summary/in-depth description, so I'll know exactly what to look out for and how to fix errors.
In the first week, all tests with the initial A to L are tackled.
As a manager, I’d like to compare multiple test runs with each other, so I can see how the code base developed in terms of code smells and potentially find trouble spots.
The test "Significant Duplication" produces a "ERROR" for each tested method.
The following LinterTests related to spelling are not working:
Class categories
Class comments
Class names
Class variable names
There seem to be issues with normalization.
Currently it does register the result (although it is computed???). There are similar problems in other related tests, something with Environments?
Other LinterTests: Variables not referenced.
Ask Björn.
Currently, the magic numbers detection does not do, what one thinks it should do:
"b := 'hrm' " -> There's one magic number ('hrm').
"b := 'hello'" -> There's no magic number.
"b := 'abc'" -> There's no magic number.
"b := 'abf'" -> There's one magic number.
"b := 'LarsSeifert'" -> There's one magic number.
"b := 'Lars Seifert' -> There's no magic number.
"b := 3.1415931234 -> There's no magic number.
So, "magic numbers" are wrongly spelled or badly formatted strings.
It would be better if magic numbers would do what we expect (b := 3.141...) and nothing else.
When going into the Linter Options/Preferences and clicking at "--all--", an error window appears. Further clicks on other categories will then produce the same error too.
That's not good.
As a seasoned user, I’d like to be able to use keyboard shortcuts instead of the GUI, so I don’t have to navigate through context menus and can get back to coding even faster.
As a developer, I’d would like SwaLint to suggest solutions that I can accept or reject, in order to speed up development by reducing workload -- especially for 'mundane' tests.
Class-based SmallLint tests (and potentially other tests, but their behavior has not been examined yet) seem to be executed exactly as often per class as the amount of methods in the class dictates. That also means a test ist never executed if there are no methods in a class.
This suggests that the current implementation just delegates calls arriving at checkMethod
to checkClass
, which would yield exactly this behavior.
Obviously, this cannot be intended and should thus be fixed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.