Skip to content
Snippets Groups Projects
Commit 8863d608 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: add todos for linting errors

parent 4b921fdb
No related branches found
No related tags found
1 merge request!11F files
Pipeline #12069 passed
Pipeline: caosdb-cppinttest

#12070

    ......@@ -43,7 +43,9 @@ std::size_t FileReader::read(std::string &buffer) {
    if (!stream_.eof()) {
    auto bufferSize = buffer.size();
    if (bufferSize > 0) {
    if (!stream_.read(&buffer[0], bufferSize)) {
    // TODO(tf) error: narrowing conversion from 'unsigned long' to signed
    // type 'std::streamsize' (aka 'long').
    if (!stream_.read(&buffer[0], bufferSize)) { // NOLINT
    throw FileIOError("Can't read file: " + filename_.string());
    }
    ......
    ......@@ -34,7 +34,10 @@ void FileWriter::openFile() {
    void FileWriter::write(const std::string &buffer) {
    auto bufferSize = buffer.size();
    if (bufferSize > 0) {
    if (!stream_.write(buffer.data(), bufferSize)) {
    // TODO(tf) error: narrowing conversion from 'unsigned long' to signed type
    // 'std::streamsize' (aka 'long').
    // NOLINT
    if (!stream_.write(buffer.data(), bufferSize)) { // NOLINT
    throw FileIOError("Can't write file: " + filename_.string());
    }
    }
    ......
    ......@@ -257,7 +257,8 @@ auto Transaction::Execute() -> TransactionStatus {
    return status;
    }
    auto Transaction::ExecuteAsynchronously() noexcept -> StatusCode {
    // TODO(tf) This has apparently a cognitive complexity of 39>25 (threshold).
    auto Transaction::ExecuteAsynchronously() noexcept -> StatusCode { // NOLINT
    if (!IsStatus(TransactionStatus::READY()) &&
    !IsStatus(TransactionStatus::GO_ON())) {
    return StatusCode::TRANSACTION_STATUS_ERROR;
    ......@@ -356,7 +357,8 @@ auto Transaction::ExecuteAsynchronously() noexcept -> StatusCode {
    return StatusCode::EXECUTING;
    }
    auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
    // TODO(tf) This has apparently a cognitive complexity of 36>25 (threshold).
    auto Transaction::WaitForIt() const noexcept -> TransactionStatus { // NOLINT
    bool set_error = false;
    auto *responses = this->response->mutable_responses();
    std::vector<std::unique_ptr<Entity>> entities;
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment