1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

907 Commits

Author SHA1 Message Date
3d49fc59dd Implement flatten/0 in terms of flatten/1 2015-07-24 21:55:43 -07:00
16e8d0b1ab detect invalid path expression (fix #862) 2015-07-24 20:23:07 -07:00
5856a2d2c0 simplify implementation of bsearch to use "until" and avoid "last"; tested 2015-07-24 12:29:20 -07:00
227f62e013 Rebuild jq.1.prebuilt 2015-07-24 09:01:21 -07:00
89244cc3ea fix references to --color-output 2015-07-24 10:18:12 -04:00
3a43e2ff07 Updated v1.3 filenames
The jq 1.3 filenames for Windows are jq-1.3.exe instead of jq.exe. Updated these so they no longer return a 404.
2015-07-23 22:24:39 -07:00
81f328f1aa Copy over changes made to gh-pages directly
This includes the following commits from the gh-pages branch:

 - 63e80b8
 - d24a397
 - 9796cd6
 - ee21707
 - ccb0f1d
 - 200e6b3
 - 64134c0
 - 57152d2
 - 8ffbfa3
2015-07-23 21:51:30 -07:00
f5a7bba986 Resolve remaining shift/reduce conflicts involving '?'
By lowering the precedence of rules that should never use
the generic Exp '?' rule.
2015-07-19 09:43:10 -07:00
66ef8e2c24 Resolve shift/reduce conflict of 'def' vs '|'
This was an important conflict. In the following expression:

    def a: 0; . | a

Bison needs to decide between these two equally valid
parses:

    (def a: 0; .) | a
    def a: 0; (. | a)

For jq we want the second one, because the first results in
"a/0 is not defined". In the current parser the first parse
is a reduce and the second parse is a shift. Since Bison
prefers to shift in shift/reduce conflicts, we accidentally
got the correct behavior.

This commit adds a precedence level FUNCDEF which is lower
precedence than '|', meaning we explicitly choose the
correct parse.

Of course many unit tests already cover this case, but I
added one specifically for it.
2015-07-19 09:42:01 -07:00
1628bbf95f Clean up trailing whitespace 2015-07-19 09:38:50 -07:00
812703139c Use =, not ==, for shell tests 2015-07-18 21:12:08 -05:00
54add5ac9a travis has whitelisted libonig-dev
https://github.com/travis-ci/travis-ci/issues/4123
2015-07-10 13:21:00 -07:00
f183b57ed5 input_filename should never empty 2015-07-10 12:32:11 -05:00
dc4dfdff17 Update AUTHORS 2015-07-10 12:28:21 -05:00
f55034d314 Update NEWS 2015-07-10 11:26:29 -05:00
930899e12d Update ChangeLog 2015-07-10 11:12:24 -05:00
579518c78d Use include for import into namespace 2015-07-10 10:19:33 -05:00
fa45a5121c Simplify import docs 2015-07-10 10:11:30 -05:00
862566a48f Fix typo in docs 2015-07-10 10:10:28 -05:00
f9f4d2d1e5 Dockerfile reorganized
* Remove excess layer creation
  This is an antipattern in Docker.
* Remove build tools once build is complete
  Leaving them around is not necessary and expands the image size 5x
* Make check works with libonig installed
* Compiles statically (needs libonig to be built rather than installed)
* Valgrind doesn't work with the use of TLS in jq so it's disabled -- this
  might be a FIXME situation; I'm not familiar enough with valgrind to
  say whether this is expected
* Make entrypoint be the jq binary so that the image can also be used
  to run jq in environments where you don't want to or can't install
  jq (such as CoreOS).
2015-07-10 07:15:44 -07:00
b74379532d Fixing missing D in LIBM_DDD_NO macro name 2015-07-09 14:59:37 -04:00
1e5e0c9fe2 Make jq.h usable from C++
Previously, with clang++:
jq.h:46:37: error: typedef redefinition with different
      types ('struct jq_util_input_state *' vs 'jq_util_input_state')

With g++:
jq.h:46:37: error: conflicting declaration
      ‘typedef struct jq_util_input_state* jq_util_input_state’

This typedef was added to libjq by commit 0d41447 which was
after the 1.4 release, so although it is a public API, this
is not a backcompat break because it has never been in a
release.

Specifying the "*" at all uses of jq_util_input_state is
slightly tedious, but jq_state already works that way, so at
least it will be consistent.
2015-07-04 15:08:01 -07:00
05899f8b3e Fix Windows build 2015-07-04 13:45:24 -05:00
a2a6f2d896 Document math support 2015-07-03 21:19:01 -05:00
1c350c67d7 Remove pow10 for now; CHECK_MATH_FUNC needs work
The CHECK_MATH_FUNC() m4 macro needs work.  It should use
AC_RUN_IFELSE(), not just AC_LINK_IFELSE(), and it should #define
_GNU_SOURCE and/or other such feature macros in the prologue to get
non-standard math functions (alternatvely jq should only support
standard math functions).
2015-07-03 21:13:13 -05:00
2348b7245e docs and diagram for exec_stack 2015-07-02 23:58:07 -07:00
6e27de4f74 strftime wrong day-of-week (fix #838) 2015-07-01 20:37:16 -07:00
e5dafaea44 Document --run-tests 2015-06-28 13:57:02 -05:00
fd4f4f2087 Make --run-tests' jv_test() quiet 2015-06-28 13:39:32 -05:00
6c89186437 Make --run-tests less verbose by default
Adding --debug-trace or --debug-dump-disasm before --run-tests now makes
it verbose.
2015-06-27 23:31:44 -05:00
32c4759e6b Add more basic number tests 2015-06-27 23:15:16 -05:00
6366cfd7a4 Add pow, better libm detection (fix #443) 2015-06-27 23:14:46 -05:00
9985c01975 gcov exclusions 2015-06-27 14:48:13 -07:00
e6371712ff flag to enable gcov and coveralls 2015-06-27 11:25:01 -07:00
d7e35101c5 add configure option to run tests without valgrind 2015-06-27 11:24:53 -07:00
1defaa7b00 Fix braino in merging the previous commit
There's a mantest that shows how to use `env`.  Well, we need to set the
env var as expected then, else it will fail.
2015-06-27 13:00:41 -05:00
815b4c9772 get Travis CI working 2015-06-27 12:40:01 -05:00
aaf305868c Restore import into caller's namespace 2015-06-26 23:40:37 -05:00
8cc31f0f49 Slight re-phrasing of module docs 2015-06-26 23:38:24 -05:00
a011ac6392 Use set -u in tests/setup 2015-06-26 23:36:34 -05:00
505e23124f Fix #830 2015-06-26 21:24:01 -05:00
e7f6d1e6d0 Update Adavanced section of manual 2015-06-26 21:19:29 -05:00
a220482de6 Document {$var} 2015-06-26 21:18:58 -05:00
e16bd17571 Add {$var} . as {$var} syntax (fix #831) 2015-06-26 20:45:14 -05:00
25d47ca08e Add streaming utilities (fix #827) 2015-06-26 20:45:06 -05:00
5108a451ca Alternative implementation of tovalues 2015-06-26 20:17:02 -05:00
ec7647c4ab Add combinations/0 and combinations/1 2015-06-23 10:59:58 -05:00
8aecf82bfe WriteFile() on WIN32 when stdout isatty (fix #824)
Use WriteFile() and bypass stdio IFF stdout isatty and we're on Windows.
2015-06-22 20:47:47 -05:00
10cbb9b580 Fix test failure introduced by previous commit 2015-06-22 18:32:28 -05:00
4a316fbb5a fix errors flagged by clang static analyzer
builtin.c: bug - free of uninitialized jv
compile.c: missing assertion
jq_test.c: buggy logic / unreachable code
jv.c: missing assertion
jv_alloc.c: false positive - intentional read of uninitialized memory
jv_file.c: dead code
2015-06-20 16:08:56 -05:00