- 
                Notifications
    
You must be signed in to change notification settings  - Fork 41
 
          Fixed KdocComments and KdocFormatting
          #1892
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            DrAlexD
  wants to merge
  10
  commits into
  master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
bugfix/kdoc_formatting
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            10 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      fa7f3cf
              
                WIP
              
              
                DrAlexD af00918
              
                - added fix test for case when there is description and some properti…
              
              
                DrAlexD 0ad4b0a
              
                - refactoring
              
              
                DrAlexD f4c6ab4
              
                - fixed bug for case when `@property` and `@constructor` basic tags h…
              
              
                DrAlexD baab7b9
              
                - diktat fix
              
              
                DrAlexD bebee7d
              
                Merge branch 'master' into bugfix/kdoc_formatting
              
              
                DrAlexD dc3de66
              
                Merge branch 'master' of https://github.com/saveourtool/diktat into b…
              
              
                DrAlexD f4eaa14
              
                - conversation fix
              
              
                DrAlexD 24166ca
              
                - conversation fix
              
              
                DrAlexD ffd6dd2
              
                Merge branch 'master' into bugfix/kdoc_formatting
              
              
                orchestr7 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            332 changes: 332 additions & 0 deletions
          
          332 
        
  diktat-cli/src/test/resources/test/smoke/src/main/kotlin/ClassKdocExpected.kt
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,332 @@ | ||
| package com.saveourtool.diktat | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| */ | ||
| class A constructor( | ||
| name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| * single-line comment | ||
| */ | ||
| class A constructor( | ||
| name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| * block | ||
| * comment | ||
| */ | ||
| class A constructor( | ||
| name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| * kdoc property | ||
| * comment | ||
| */ | ||
| class A constructor( | ||
| name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| */ | ||
| class A constructor( | ||
| /** | ||
| * @property name property | ||
| * comment | ||
| */ | ||
| name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property name property info | ||
| */ | ||
| class A constructor( | ||
| val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property name property info | ||
| * single-line comment | ||
| */ | ||
| class A constructor( | ||
| val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property name property info | ||
| * block | ||
| * comment | ||
| */ | ||
| class A constructor( | ||
| val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property name property info | ||
| * kdoc property | ||
| * comment | ||
| */ | ||
| class A constructor( | ||
| val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property name property info | ||
| */ | ||
| class A constructor( | ||
| /** | ||
| * @property name property | ||
| * comment | ||
| */ | ||
| val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| */ | ||
| class A constructor( | ||
| private val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| * single-line comment | ||
| */ | ||
| class A constructor( | ||
| private val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| * block | ||
| * comment | ||
| */ | ||
| class A constructor( | ||
| private val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param name property info | ||
| * kdoc property | ||
| * comment | ||
| */ | ||
| class A constructor( | ||
| private val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property name property info | ||
| */ | ||
| class A constructor( | ||
| /** | ||
| * @property name property | ||
| * comment | ||
| */ | ||
| private val name: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param K | ||
| * @property openName open property info | ||
| * single-line comment | ||
| * @property openLastName open last property | ||
| * info | ||
| * block | ||
| * comment | ||
| * @property openAddr property | ||
| * info | ||
| * @property openBirthDate kdoc property | ||
| * comment | ||
| */ | ||
| open class B<K : Any> constructor( | ||
| open val openName: String, | ||
| open val openLastName: String, | ||
| open val openBirthDate: String, | ||
| /** | ||
| * @property openAddr property | ||
| * comment | ||
| */ | ||
| open val openAddr: String | ||
| ) {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @param P generic type | ||
| * @param K generic type | ||
| * @param privateLastName private | ||
| * property info | ||
| * block | ||
| * comment | ||
| * @param G | ||
| * @param privateName single-line comment | ||
| * @param paramName single-line comment | ||
| * @param paramLastName block | ||
| * comment | ||
| * @param privateBirthDate kdoc property | ||
| * comment | ||
| * @param paramBirthDate kdoc property | ||
| * comment | ||
| * @property internalName internal | ||
| * property info | ||
| * single-line comment | ||
| * @property openName override | ||
| * property info | ||
| * single-line comment | ||
| * @property openAddr override | ||
| * property info | ||
| * @property protectedName single-line comment | ||
| * @property name single-line comment | ||
| * @property protectedLastName block | ||
| * comment | ||
| * @property internalLastName block | ||
| * comment | ||
| * @property openLastName block | ||
| * comment | ||
| * @property lastName block | ||
| * comment | ||
| * @property protectedBirthDate kdoc property | ||
| * comment | ||
| * @property internalBirthDate kdoc property | ||
| * comment | ||
| * @property openBirthDate kdoc property | ||
| * comment | ||
| * @property birthDate kdoc property | ||
| * comment | ||
| */ | ||
| class A<K : Any, P : Any, G : Any> constructor( | ||
| private val privateName: String, | ||
| protected val protectedName: String, | ||
| internal val internalName: String, | ||
| override val openName: String, | ||
| val name: String, | ||
| paramName: String, | ||
| private val privateLastName: String, | ||
| protected val protectedLastName: String, | ||
| internal val internalLastName: String, | ||
| override val openLastName: String, | ||
| val lastName: String, | ||
| paramLastName: String, | ||
| private val privateBirthDate: String, | ||
| protected val protectedBirthDate: String, | ||
| internal val internalBirthDate: String, | ||
| override val openBirthDate: String, | ||
| val birthDate: String, | ||
| paramBirthDate: String, | ||
| /** | ||
| * @property privateAddr property | ||
| * comment | ||
| */ | ||
| private val privateAddr: String, | ||
| /** | ||
| * @property protectedAddr property | ||
| * comment | ||
| */ | ||
| protected val protectedAddr: String, | ||
| /** | ||
| * @property internalAddr property | ||
| * comment | ||
| */ | ||
| internal val internalAddr: String, | ||
| /** | ||
| * @property openAddr property | ||
| * comment | ||
| */ | ||
| override val openAddr: String, | ||
| /** | ||
| * @property addr property | ||
| * comment | ||
| */ | ||
| val addr: String, | ||
| /** | ||
| * @property paramAddr property | ||
| * comment | ||
| */ | ||
| paramAddr: String, | ||
| ) : B<K>() {} | ||
| 
     | 
||
| /** | ||
| * kdoc | ||
| * class | ||
| * comment | ||
| * | ||
| * @property keyAs | ||
| * @property as | ||
| */ | ||
| actual annotation class JsonSerialize( | ||
| actual val `as`: KClass<*>, | ||
| actual val keyAs: KClass<*>, | ||
| ) | ||
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.