Home - gregswindle/eslint-plugin-crc GitHub Wiki
First and foremost, this plugin is made to help you refactor. To that end, its near- and mid-term goals include
-
Automated CRC Model reports with hyperlinks to associated source code.
-
Auto-generated Object responsibilities based on annotations, e.g., JSDoc @descriptions,
git
logs, etc. -
Code smell detection, over time.
-
Refactoring recommendations with hyperlinks to popular refactoring catalogs (e.g., Refactoring Guru and Martin Fowler's Catalog of Refactorings).
-
Static source code metrics within time-ranges. These metrics must formally substantiate the previously mentioned goals to avoid data puke reports:
a. Total/Average SLOC (source lines of code)
b. Maintainability indexes for a CRC Model
Clear, unambiguous, and effective communication is hard. Linguists have demonstrated the syntactic and semantic ambiguity of natural languages for centuries. As a consequence, scientists and logicians devised constructed languages in order to communicate more precisely and accurately. Modern programming languages are recent examples of constructed languages.
Even with the exactitude of programming languages, however, cognitive psychologists have proven that humans are not only oblivious to valid and invalid forms of reasoning, but also resistant to exercising one type of conditional logic even after they've formally studied it. [1]
Luckily, most professional programmers and engineers are forced to exercise valid conditional reasoning as part of their trade. Valid reasoning is necessary, but it is not sufficient: expertise with conditional syllogisms does not teach us how to translate a hodgepodge of actions, facts, and goals -- also known as "requirements" -- into conceptual models that execute the purpose and intention lurking somewhere among all the User Stories. The extent to which product delivery teams are able to articulate a proposed product's purpose and intention often dictates the success or failure of the product itself.
Fortunately an entire field of study exists to help us overcome the challenges of converting resources into products that meet objective goals. This field is called design.
Infer the purpose of software products based on data mined from:
- AST structure
- Identifier names
- Code comments
- Tests
- Source control logs
In order to infer and communicate the semantic intent lurking within source code, the application of semantic roles feels like a natural fit. John Sowa's Conceptual Graphs could be useful, not only for discovering and expressing the semantic intent of source code, but also for pointing out risks associated with inconsistent or even contradictory expressions of purpose (i.e., bad design).
This report was generated by the tests/crc-model-formatter.spec.js
specs; a simple "es5-object-identification
fixtures; and a lodash
html template.
Alpha |
|
---|---|
Responsibilities | Collaborators |
|
|
Bravo |
|
---|---|
Responsibilities | Collaborators |
|
|
Charlie |
|
---|---|
Responsibilities | Collaborators |
|
|
Delta |
|
---|---|
Responsibilities | Collaborators |
|
|
Echo |
|
---|---|
Responsibilities | Collaborators |
|
|
Foxtrot |
|
---|---|
Responsibilities | Collaborators |
|
|