LOC and Clean Code


I’m wondering about how LOC goes somewhat against readability :

 _logger.LogControllerAction(_identityService.GetUserName(), deleteShareModel.Uuid, JsonSerializer.Serialize(deleteShareModel, JsonConverter.JsonSerializerAuthOptions));

is worth 1 LOC

  JsonSerializer.Serialize(deleteShareModel, JsonConverter.JsonSerializerAuthOptions)

seems to be worth 5 LOC but is strictly the same as the previous one.

This may prevent coders using Developer+ edition of SonarQube to write cleaner more understandable code.

Why the difference ?

We have to pay the bills somehow? :smiley:

More seriously–with the smallest license available being 100k Lines of Code, we don’t really expect users to adjust how they code on account of their SonarQube license. I haven’t seen examples in the wild where users were driven to write less readable code as a result of their licenses.

We prefer this model to, for example, seat-based licensing where inevitably only some developers will get access (not to mention other stakeholders who should have access to this data). We think that teams benefit from making sure all developers have access to tooling like this – not just team leaders, dev managers, etc.

Nothing is written is stone, but that’s our perspective on licensing at the time being.

Hopefully you’re right :smiley:

As a new Developer edition user, it startled me a bit.
I never really looked after the LOCs in the Community Edition so I now keep an eye on their progression.

Though, I would imagine 1 LOC would be 1 command in the corresponding language rather than a line of code delimited by ‘\r\n’ :thinking: