1 #**************************************************************************
2 #* *
3 #* OCaml *
4 #* *
5 #* Damien Doligez, projet Gallium, INRIA *
6 #* *
7 #* Copyright 2015 Institut National de Recherche en Informatique et *
8 #* en Automatique. *
9 #* *
10 #* All rights reserved. This file is distributed under the terms of *
11 #* the GNU Lesser General Public License version 2.1, with the *
12 #* special exception on linking described in the file LICENSE. *
13 #* *
14 #**************************************************************************
15
16 # Default behaviour, for if core.autocrlf isn't set
17 * text=auto
18
19 # It is not possible to wrap lines lines in .gitattributes files
20 .gitattributes typo.long-line=may
21
22 # Binary files
23 /boot/ocamlc binary
24 /boot/ocamllex binary
25 /boot/ocamldep binary
26 *.gif binary
27 *.png binary
28 *.tfm binary
29
30 /boot/menhir/parser.ml* -diff
31
32 # configure is declared as binary so that it doesn't get included in diffs.
33 # This also means it will have the correct Unix line-endings, even on Windows.
34 /configure binary
35
36 # 'union' merge driver just unions textual content in case of conflict
37 # http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/
38 /.mailmap merge=union
39
40 # We tried using 'union' for Changes and it did not work:
41 # instead of creating Changes conflict it would silently duplicate
42 # the lines involved in the conflict, which is arguably worse
43 #/Changes merge=union
44
45 # No header for text files (would be too obtrusive).
46 *.md typo.missing-header
47 README* typo.missing-header
48 *.adoc typo.missing-header
49 stdlib/*.mld typo.missing-header
50 tools/mantis2gh_stripped.csv typo.missing-header
51
52 *.adoc typo.long-line=may
53
54 /.mailmap typo.long-line typo.missing-header typo.non-ascii
55 /.merlin typo.missing-header
56 /Changes typo.utf8 typo.missing-header
57 /News typo.utf8 typo.missing-header
58 /INSTALL typo.missing-header
59 /LICENSE typo.very-long-line typo.missing-header
60 # tools/ci/appveyor/appveyor_build.cmd only has missing-header because
61 # dra27 too lazy to update check-typo to interpret Cmd-style comments!
62 /tools/ci/appveyor/appveyor_build.cmd typo.very-long-line typo.missing-header typo.non-ascii
63 /tools/ci/appveyor/appveyor_build.sh typo.non-ascii
64 /tools/ci/inria/remove-sinh-primitive.patch typo.white-at-eol typo.missing-header typo.long-line
65 /tools/release-checklist typo.missing-header typo.very-long-line
66
67 # ignore auto-generated .depend files
68 .depend typo.prune
69 /.depend.menhir typo.prune
70
71 # Makefiles may contain tabs
72 Makefile* typo.tab=may
73
74 asmcomp/*/emit.mlp typo.tab=may typo.long-line=may
75
76 # The build-aux directory contains bundled files so do not check it
77 build-aux typo.prune
78
79 /manual typo.prune
80 /manual/** typo.prune
81
82 # configure is generated so do not check it
83 configure typo.prune
84
85 ocaml-variants.opam typo.prune
86
87 emacs/*.el typo.long-line=may
88 emacs/caml.el typo.long-line=may typo.missing-header
89 emacs/COPYING typo.prune
90 emacs/ocamltags.in typo.non-printing
91
92 ocamldoc/** typo.long-line=may
93 ocamldoc/Changes.txt typo.missing-header
94 ocamldoc/ocamldoc.sty typo.missing-header
95 ocamldoc/odoc_index.html typo.missing-header
96
97 otherlibs/win32unix/readlink.c typo.long-line
98 otherlibs/win32unix/stat.c typo.long-line
99 otherlibs/win32unix/symlink.c typo.long-line
100
101 stdlib/hashbang typo.white-at-eol typo.missing-lf
102
103 testsuite/tests/** typo.missing-header typo.long-line=may
104 testsuite/tests/lib-bigarray-2/bigarrf.f typo.tab
105 testsuite/tests/lib-unix/win-stat/fakeclock.c typo.missing-header=false
106 testsuite/tests/misc-unsafe/almabench.ml typo.long-line
107 testsuite/tests/tool-toplevel/strings.ml typo.utf8
108 testsuite/tests/win-unicode/*.ml typo.utf8
109 testsuite/tools/*.S typo.missing-header
110 testsuite/tools/*.asm typo.missing-header
111 testsuite/typing typo.missing-header
112
113 # prune testsuite reference files
114 testsuite/tests/**/*.reference typo.prune
115
116 # Expect tests with overly long lines of expected output
117 testsuite/tests/parsing/docstrings.ml typo.very-long-line
118
119 tools/magic typo.missing-header
120
121 # TODO we should fix the long-line errors in yacc/*.c
122 /yacc/*.[ch] typo.very-long-line=may
123
124 menhir-bench.bash typo.missing-header typo.utf8
125
126 # bootstrap files produced by Menhir
127 /boot/menhir/** typo.long-line=may typo.very-long-line=may
128 /boot/menhir/** typo.missing-header=may
129 /boot/menhir/** typo.white-at-eol=may
130 /boot/menhir/** typo.utf8=may
131
132 # Line-ending specifications, for Windows interoperability
133 *.sh text eol=lf
134 *.sh.in text eol=lf
135 *.awk text eol=lf
136 *.m4 text eol=lf
137
138 # ocamltest hooks which are used in the testsuite
139 *.check-program-output text eol=lf
140 *.run text eol=lf
141
142 /tools/ci/appveyor/appveyor_build.cmd text eol=crlf
143
144 configure.ac text eol=lf
145 autogen text eol=lf
146 build-aux/compile text eol=lf
147 build-aux/config.guess text eol=lf
148 build-aux/config.sub text eol=lf
149 build-aux/install text eol=lf
150 build-aux/missing text eol=lf
151 ocamldoc/remove_DEBUG text eol=lf
152 ocamltest/getocamloptdefaultflags text eol=lf
153 stdlib/Compflags text eol=lf
154 stdlib/sharpbang text eol=lf
155 tools/ci/inria/remove-sinh-primitive.patch text eol=lf
156 tools/check-typo text eol=lf
157 tools/ci-build text eol=lf
158 tools/msvs-promote-path text eol=lf
159 tools/gdb-macros text eol=lf
160 tools/magic text eol=lf
161 tools/make-opcodes text eol=lf
162 tools/make-package-macosx text eol=lf
163 tools/ocaml-objcopy-macosx text eol=lf
164 tools/ocamlmktop.tpl text eol=lf
165 tools/ocamlsize text eol=lf
166 tools/pre-commit-githook text eol=lf
167 tools/markdown-add-pr-links.sh text eol=lf
168 runtime/caml/m.h.in text eol=lf
169 runtime/caml/s.h.in text eol=lf
170 runtime/caml/compatibility.h typo.long-line=may
171
172 # These are all Perl scripts, so may not actually require this
173 manual/tools/caml-tex text eol=lf
174 manual/tools/format-intf text eol=lf
175 manual/tools/htmlcut text eol=lf
176 manual/tools/htmltbl text eol=lf
177 manual/tools/htmlthread text eol=lf
178 manual/tools/texexpand text eol=lf
179
180 # Tests which include references spanning multiple lines fail with \r\n
181 # endings, so use \n endings only, even on Windows.
182 testsuite/tests/basic-modules/anonymous.ml text eol=lf
183 testsuite/tests/basic-more/morematch.ml text eol=lf
184 testsuite/tests/basic-more/robustmatch.ml text eol=lf
185 testsuite/tests/parsing/*.ml text eol=lf
186 testsuite/tests/docstrings/empty.ml text eol=lf
187 testsuite/tests/functors/functors.ml text eol=lf
188 testsuite/tests/tool-ocamlc-stop-after/stop_after_parsing_impl.ml text eol=lf
189 testsuite/tests/tool-ocamlc-stop-after/stop_after_parsing_intf.mli text eol=lf
190 testsuite/tests/tool-ocamlc-stop-after/stop_after_typing_impl.ml text eol=lf
191 testsuite/tests/tool-toplevel/error_highlighting.ml text eol=lf
192 testsuite/tests/tool-toplevel/error_highlighting_use4.ml text eol=lf
193 testsuite/tests/translprim/module_coercion.ml text eol=lf
194 testsuite/tests/typing-objects-bugs/pr3968_bad.ml text eol=lf
195 testsuite/tests/typing-ocamlc-i/pr7402.ml text eol=lf
196 testsuite/tests/typing-ocamlc-i/pervasives_leitmotiv.ml text eol=lf
197 testsuite/tests/typing-recmod/t12bad.ml text eol=lf
198 testsuite/tests/typing-safe-linking/b_bad.ml text eol=lf
199 testsuite/tests/warnings/w04.ml text eol=lf
200 testsuite/tests/warnings/w04_failure.ml text eol=lf
201 testsuite/tests/warnings/w32.ml text eol=lf
202
203 # These are forced to \n to allow the Cygwin testsuite to pass on a
204 # Windows-checkout
205 testsuite/tests/formatting/margins.ml text eol=lf
206 testsuite/tests/letrec-check/pr7706.ml text eol=lf
207 testsuite/tests/letrec-disallowed/disallowed.ml text eol=lf
208 testsuite/tests/letrec-disallowed/extension_constructor.ml text eol=lf
209 testsuite/tests/letrec-disallowed/float_block_allowed.ml text eol=lf
210 testsuite/tests/letrec-disallowed/float_block_disallowed.ml text eol=lf
211 testsuite/tests/letrec-disallowed/generic_arrays.ml text eol=lf
212 testsuite/tests/letrec-disallowed/lazy_.ml text eol=lf
213 testsuite/tests/letrec-disallowed/module_constraints.ml text eol=lf
214 testsuite/tests/letrec-disallowed/unboxed.ml text eol=lf
215 testsuite/tests/letrec-disallowed/pr7215.ml text eol=lf
216 testsuite/tests/letrec-disallowed/pr7231.ml text eol=lf
217 testsuite/tests/letrec-disallowed/pr7706.ml text eol=lf
218 testsuite/tests/lexing/uchar_esc.ml text eol=lf
219 testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml text eol=lf
220 testsuite/tests/tool-toplevel/pr7060.ml text eol=lf
221 testsuite/tests/typing-extension-constructor/test.ml text eol=lf
222 testsuite/tests/typing-extensions/extensions.ml text eol=lf
223 testsuite/tests/typing-extensions/open_types.ml text eol=lf
224 testsuite/tests/typing-objects/Exemples.ml text eol=lf
225 testsuite/tests/typing-objects/pr5619_bad.ml text eol=lf
226 testsuite/tests/typing-objects/pr6123_bad.ml text eol=lf
227 testsuite/tests/typing-objects/pr6907_bad.ml text eol=lf
228 testsuite/tests/typing-objects/Tests.ml text eol=lf
229 testsuite/tests/typing-pattern_open/pattern_open.ml text eol=lf
230 testsuite/tests/typing-private/private.ml text eol=lf
231 testsuite/tests/typing-recordarg/recordarg.ml text eol=lf
232 testsuite/tests/typing-short-paths/pr5918.ml text eol=lf
233 testsuite/tests/typing-sigsubst/sigsubst.ml text eol=lf
234 testsuite/tests/typing-typeparam/newtype.ml text eol=lf
235 testsuite/tests/typing-unboxed/test.ml text eol=lf
236 testsuite/tests/typing-unboxed-types/test.ml text eol=lf
237 testsuite/tests/typing-unboxed-types/test_flat.ml text eol=lf
238 testsuite/tests/typing-unboxed-types/test_no_flat.ml text eol=lf
239 testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml text eol=lf
240 testsuite/tests/typing-warnings/application.ml text eol=lf
241 testsuite/tests/typing-warnings/coercions.ml text eol=lf
242 testsuite/tests/typing-warnings/exhaustiveness.ml text eol=lf
243 testsuite/tests/typing-warnings/pr6587.ml text eol=lf
244 testsuite/tests/typing-warnings/pr6872.ml text eol=lf
245 testsuite/tests/typing-warnings/pr7085.ml text eol=lf
246 testsuite/tests/typing-warnings/pr7115.ml text eol=lf
247 testsuite/tests/typing-warnings/pr7261.ml text eol=lf
248 testsuite/tests/typing-warnings/pr7297.ml text eol=lf
249 testsuite/tests/typing-warnings/pr7553.ml text eol=lf
250 testsuite/tests/typing-warnings/records.ml text eol=lf
251 testsuite/tests/typing-warnings/unused_types.ml text eol=lf
252