Menu

#703 Style fixup functionality

v1.1.x
closed
v1.1.4
New Functionality
2022-08-08
2022-05-14
Erik Hänel
No

Create a refactoring functionality to resolve styling issues like wrong or missing variable typisation.

Analysis:

Creating a type prefix for string variables should be easy. Creating the correct type prefix for numerical variables, is a bit harder. We will use the initial value, if available. If its a boolean, use the boolean prefix, if it is an integer, then the integer prefix. Otherwise use the floating point prefix.

Use also the possible type of the assigned variable, if available, to deduce the variable's type.

The functionality shall be available as context menu entry located within the refactoring menu.

Implementation:

  • Implementation: Functionality was implemented as proposed by the analysis.
  • Revision: [r1180]
  • Implementation test: Different files were examined and various type prefixes were determined. Most were correct (a small chance to obtain a suprising prefix persists).

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [x] corresponding language files updated
    • [ ] not needed

Tests:

Functionality was tested manually. Objectively, it returns fitting prefixes in most cases. Sometimes the prefix is subjectively not optimal, but that's related to the arbitrary usage f, n and b.

Related

Commit: [r1180]

Discussion

  • Erik Hänel

    Erik Hänel - 2022-06-05
    • labels: --> editor, analyzer
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-06-07
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     Create a refactoring functionality to resolve styling issues like wrong or missing variable typisation.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2022-06-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,9 @@
     Create a refactoring functionality to resolve styling issues like wrong or missing variable typisation.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +Creating a type prefix for string variables should be easy. Creating the correct type prefix for numerical variables, is a bit harder. We will use the initial value, if available. If its a boolean, use the boolean prefix, if it is an integer, then the integer prefix. Otherwise use the floating point prefix.
    +
    +The functionality shall be available as context menu entry located within the refactoring menu.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2022-07-01
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,6 +2,8 @@
    
     ###Analysis:
     Creating a type prefix for string variables should be easy. Creating the correct type prefix for numerical variables, is a bit harder. We will use the initial value, if available. If its a boolean, use the boolean prefix, if it is an integer, then the integer prefix. Otherwise use the floating point prefix.
    +
    +Use also the possible type of the assigned variable, if available, to deduce the variable's type.
    
     The functionality shall be available as context menu entry located within the refactoring menu.
    
     
  • Erik Hänel

    Erik Hänel - 2022-07-03
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,19 +8,19 @@
     The functionality shall be available as context menu entry located within the refactoring menu.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Functionality was implemented as proposed by the analysis.
    +* Revision: [r1180]
    +* Implementation test: Different files were examined and various type prefixes were determined. Most were correct (a small chance to obtain a suprising prefix persists).
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
    -    * [ ] corresponding language files updated
    +    * [x] corresponding language files updated
         * [ ] not needed
    
     ###Tests:
    
    • status: implementing --> testing
     

    Related

    Commit: [r1180]

  • Erik Hänel

    Erik Hänel - 2022-08-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -24,4 +24,4 @@
    
         * [ ] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Functionality was tested manually. Objectively, it returns fitting prefixes in most cases. Sometimes the prefix is subjectively not optimal, but that's related to the arbitrary usage `f`, `n` and `b`.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB