Skip to content
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

Generates duplicate @property for parameter with ' in name #1719

Closed
nulls opened this issue Jul 27, 2023 · 1 comment · Fixed by #1873
Closed

Generates duplicate @property for parameter with ' in name #1719

nulls opened this issue Jul 27, 2023 · 1 comment · Fixed by #1873
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@nulls
Copy link
Member

nulls commented Jul 27, 2023

Describe the bug

Generates duplicate @property for parameter with ``` in name

Expected behavior

Doesn't generate duplicate @property for parameter with ``` in name

Observed behavior

Steps to Reproduce

@file:Suppress("TYPE_ALIAS")

package com.saveourtool.osv4k.jackson

import kotlin.reflect.KClass

/**
 * @property using
 * @property contentUsing
 * @property keyUsing
 * @property nullsUsing
 * @property `as`
 * @property keyAs
 * @property contentAs
 * @property typing
 * @property converter
 * @property contentConverter
 * @property include
 * @property `as`
 */
@Suppress("LongParameterList")
actual annotation class JsonSerialize(
    actual val using: KClass<out JsonSerializer<out Any>>,
    actual val contentUsing: KClass<out JsonSerializer<out Any>>,
    actual val keyUsing: KClass<out JsonSerializer<out Any>>,
    actual val nullsUsing: KClass<out JsonSerializer<out Any>>,
    actual val `as`: KClass<*>,
    actual val keyAs: KClass<*>,
    actual val contentAs: KClass<*>,
    actual val typing: JsonSerializeTyping,
    actual val converter: KClass<out Converter<Any, Any>>,
    actual val contentConverter: KClass<out Converter<Any, Any>>,
    actual val include: JsonSerializeInclusion,
)
actual enum class JsonSerializeTyping {
    DEFAULT_TYPING,
    ;
}
actual enum class JsonSerializeInclusion {
    DEFAULT_INCLUSION,
    ;
}

Environment information

  • diktat version: 1.2.4
  • build tool (maven/gradle): gradle
  • how is diktat run (CLI, plugin, etc.): plugin
  • kotlin version: 1.9.0
  • operating system: Windows
  • link to a project (if your project is public): https://gitbub.com/saveourtool/osv4k
@nulls nulls added the bug Something isn't working label Jul 27, 2023
@nulls nulls changed the title Generates duplicate @property for parameter with ``` in name Generates duplicate @property for parameter with /` in name Jul 27, 2023
@nulls nulls changed the title Generates duplicate @property for parameter with /` in name Generates duplicate @property for parameter with \` in name Jul 27, 2023
@nulls nulls changed the title Generates duplicate @property for parameter with \` in name Generates duplicate @property for parameter with <>` in name Jul 27, 2023
@nulls nulls changed the title Generates duplicate @property for parameter with <>` in name Generates duplicate @property for parameter with `` in name Jul 27, 2023
@nulls nulls changed the title Generates duplicate @property for parameter with `` in name Generates duplicate @property for parameter with ' in name Jul 27, 2023
@nulls
Copy link
Member Author

nulls commented Jul 27, 2023

Probably incorrectly validated name "as" != "'as'"

@DrAlexD DrAlexD assigned DrAlexD and unassigned DrAlexD Dec 18, 2023
@DrAlexD DrAlexD added this to the 2.0.0 milestone Dec 18, 2023
DrAlexD added a commit that referenced this issue Dec 18, 2023
### What's done:
- fixed bug.
- added fix tests.

Closes #1719
DrAlexD added a commit that referenced this issue Dec 18, 2023
…1873)

### What's done:
- fixed bug.
- added fix tests.

Closes #1719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants