Omit empty mapping constructors from annotations in the style guide #8928
Labels
Area/LearnPages
Issues related to all the pages of the Learn section.
Category/Content
All written content related issues (Technical content, english language etc)
Type/Improvement
Improvements required on the website.
Description
As specified in the spec https://ballerina.io/spec/lang/master/#section_9.1, the annotation value can be optional. Therefore, it is valid to write
@test:Config
for the following source code.ballerina-dev-website/swan-lake/development-tutorials/source-code-dependencies/style-guide/annotations-documentation-and-comments.md
Lines 30 to 37 in d11afb0
IMO, omitting the mapping constructor when the value is absent should be considered best practice since it simplifies writing and improves readability.
The text was updated successfully, but these errors were encountered: