Skip to content

Commit 283ef00

Browse files
committed
[yajlpp] modernize
1 parent 68f51de commit 283ef00

5 files changed

Lines changed: 435 additions & 509 deletions

File tree

.github/workflows/bins.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- develop
78
paths-ignore:
89
- 'docs/**'
910
- 'test/**'

.github/workflows/c-cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: ci-build
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, develop]
66
paths-ignore:
77
- docs
88
- README.md

.github/workflows/tailer-ape.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: tailer-ape
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, develop ]
66
paths-ignore:
77
- docs
88
- README.md

src/yajlpp/yajlpp.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,20 @@ json_path_handler_base::validate_string(yajlpp_parse_context& ypc,
14911491
.append(" characters long"))
14921492
.with_snippet(ypc.get_snippet())
14931493
.with_help(this->get_help_text(&ypc)));
1494+
} else if (sf.length() > (ssize_t) this->jph_max_length) {
1495+
ypc.report_error(
1496+
lnav::console::user_message::error(
1497+
attr_line_t()
1498+
.append_quoted(sf)
1499+
.append(" is not a valid value for option ")
1500+
.append_quoted(
1501+
lnav::roles::symbol(ypc.get_full_path().to_string())))
1502+
.with_reason(attr_line_t("value must be at most ")
1503+
.append(lnav::roles::number(
1504+
fmt::to_string(this->jph_max_length)))
1505+
.append(" characters long"))
1506+
.with_snippet(ypc.get_snippet())
1507+
.with_help(this->get_help_text(&ypc)));
14941508
}
14951509
}
14961510

0 commit comments

Comments
 (0)