launchdarkly / ld-find-code-refs

Build tool for automatically sending feature flag code references to LaunchDarkly
https://launchdarkly.com
Other
47 stars 34 forks source link

[Documentation] using `flag name` in the code comments #150

Closed chenrui333 closed 2 years ago

chenrui333 commented 3 years ago

It looks like currently the following code reference can be supported by code push.

working

object class {
  // `flag-name`
}

not working

object class {
  // flag-name
}

I wonder if it can be documented somewhere for reference. Thanks!

InTheCloudDan commented 3 years ago

@chenrui333 can you let us know the expected use case for finding flag keys in the comments? The reason we have the built in delimiters if so that it does not find every possible instance of the word. And with code references you do have the option for adding lines of context around where that flag was found.

chenrui333 commented 3 years ago

@InTheCloudDan sorry for replying late, the expected use case is to ensure the ld-find-code-refs can scan the flags and report it. Let me know if that makes sense.

jazanne commented 2 years ago

@chenrui333 We have documented the use of delimiters when finding flags here:

https://github.com/launchdarkly/ld-find-code-refs/blob/main/docs/CONFIGURATION.md#delimiters

Please let us know if you have any feedback.

chenrui333 commented 2 years ago

I think I am all good, closing this issue.