Utilities

Todo

summary A programmatic approach to marking and tagging code that is strongly typed and consistent
jar kiit.common.jar
package kiit.common
artifact dev.kiit:kiit-common
sources src/lib/kotlin/slatekit-common/src/main/kotlin/slatekit/common
example src/lib/kotlin/slate-examples/src/main/kotlin/slatekit/examples/Example_NOTE.kt
dependency kiit-results


Gradle

Use the following settings in gradle for installing this component.

    
    buildscript {
        // Kotlin version currently being used
        ext.kotlin_version = '1.8.22'

        // Reference version 
        ext.kiit_version = '3.1.0'

        // ...
    }

    repositories {
        // Currently stored in Git Hub Packages.
        maven {
            url "https://maven.pkg.github.com/slatekit/kiit"
            credentials {
                username = System.getenv('GIT_PACKAGES_INSTALL_ACTOR')
                password = System.getenv('GIT_PACKAGES_INSTALL_TOKEN')
            }
        }

        // ...
    }

    dependencies {
        // Other dependencies ...
        implementation "dev.kiit:kiit-common:$kiit_version"
    }
    



Import

  
// required 
import kiit.common.NOTE

// optional 
import kiit.cmds.Command
import kiit.cmds.CommandRequest
import kiit.results.Success
import kiit.results.Try
  


Setup

n/a


Usage

    // About: Strongly typed, structured representation of code notes/tasks
    // This is in code to enforce consistent usage and to be able
    // to track code usages

    // Use case 1: Implement
    NOTE.IMPLEMENT("Component 1", "This code needs further error handling" )

    // Use case 2: Supply a block of code to refactor
    NOTE.REFACTOR("Feature 2", "Refactor logic to handle empty values") {
      // Your code to refactor goes here
    }

    // Use case 3: Mark a bug
    NOTE.BUG("Component 3", "invalid data, bug fix needed", "JIRA:12434" )

    // Use case 4: Code removal tag
    NOTE.REMOVE("Story 123", "@kishore, this code no longer needed") {
      // Your code to remove here.
    }