stan-dev / stan-dev/stan

Clean up code: `.str().length()`

Open
#2,577 13 comments 0 reactions 1 assignee View on GitHub

@syclik is already working on this.

Since Jul 10, 2018.

  • #3400 by @Salvatore1021 — open
code cleanup good first issue
Dominant language
C++
Stars
2.8k
Forks
388
Avg merge
2d 17h
Merged PRs (30d)
15

Description

Summary:

There are many instances of code that looks like:

if (msg.str().length() > 0)
  logger.info(msg);

We should either:

  • have the info() method ignore empty messages in general
  • wrap the call in a function
Additional Information:

Originally from this PR comment: https://github.com/stan-dev/stan/pull/2570#discussion_r201151286

Current Version:

v2.17.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.