Commit graph

480 commits

Author SHA1 Message Date
Andrei Alexandrescu
30724e67d9 Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Nick Sabalausky
5a2da77fbc std.file: Document that write/append create the file if it doesn't exist. 2017-02-20 13:51:27 -05:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
Jack Stouffer
da65768451 Add checks for infinite ranges in many range function signitures 2017-02-14 21:59:12 -05:00
Jack Stouffer
360a42ec05 Add checks for infinite ranges in many range function signitures 2017-02-14 14:19:04 -05:00
The Dlang Bot
c6d33505dc Merge pull request #5049 from Burgos/fix-17102
fix issue 17102 - Don't pass null to strlen in std.file.cenforce
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2017-01-21 18:48:11 +01:00
Nemanja Boric
e80d3b5745 Fix Issue 17102: std.write.file generates a segmentation fault when the
file name is a string with a default value

While trying to build the file name for exception
from 0terminated namez, don't pass null to strlen
2017-01-21 18:07:17 +01:00
Sebastian Wilzbach
18ecb6b72c Make more modules publicly runnable on dlang.org 2017-01-06 23:29:55 +01:00
Ryan Roden-Corrent
0a685f1daf Ensure std.file.exists(StringEnum.name) compiles.
A string-typed enum passes isSomeString but not isConvertibleToString.
Because isConvertibleToString is used as a template constraint for
std.file.exists, it could not be passed a string-typed enum.

Resolves #16573.
2016-10-30 18:57:11 -04:00
Jack Stouffer
9c4368f52c Removed uses of the delete keyword from std.file 2016-10-26 08:59:44 +01:00
Joakim
b4061155cd Fix Issue 16571 - Unittests should not list /tmp/ recursively 2016-10-04 16:26:27 +05:30
Andrei Alexandrescu
2f8e693e5d Merge pull request #4814 from e-y-e/fixflags
[trivial] [large diff] Update uses of Flag to use the Yes/No structs.
2016-09-30 18:25:44 -04:00
e-y-e
befa0bfb6e Updated Flag uses to Yes/No structs 2016-09-29 14:45:20 +01:00
Jack Stouffer
b3a8f49ca0 Added some const to varibles that aren't modified 2016-09-23 12:41:19 +01:00
Walter Bright
cc3fc19744 file.d: fix unsafe use of .ptr 2016-07-25 21:38:08 -07:00
Jack Stouffer
38fd55eb65 Removed package wide std.algorithm imports from std.file 2016-07-18 09:50:18 -04:00
Jack Stouffer
6b02d380b1 Removed unused variables from std.file 2016-07-12 09:51:35 -04:00
Walter Bright
782e5399ea Merge pull request #4455 from JackStouffer/file
Remove some global imports from std.file
2016-07-08 20:26:52 -07:00
Atila Neves
aad03b2829 Add @system and @safe to std.file unit tests 2016-07-08 16:31:17 +02:00
Jack Stouffer
323a3aed9d [std.file] Removed global std.exception import 2016-07-08 09:04:20 -04:00
Jack Stouffer
bb13820459 [std.file] Removed global std.conv and std.path imports 2016-07-08 09:04:10 -04:00
Walter Bright
8ed6280d79 Merge pull request #4456 from JackStouffer/slurp
Improved docs for std.file.slurp
2016-07-03 13:46:13 -07:00
Jack Stouffer
85860b7a5a Fixed local imports in std.file 2016-06-30 18:07:00 -04:00
Jack Stouffer
a8847ee31f Improved docs for std.file.slurp 2016-06-30 10:46:27 -04:00
Dmitry
b63d98cbc2 Added some spaces (std.file documentation)
Few code formatting of the documentation's example, for more readable

Update file.d
2016-06-30 18:18:42 +06:00
Walter Bright
b4867627dc std.file: delete is not @safe 2016-06-28 19:24:03 -07:00
Walter Bright
8fa1a9c7af std.file - fix for stricter @safe rules 2016-06-18 23:11:38 -07:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Vladimir Panteleev
79f5457c60 std.file: Simplify readText example 2016-06-05 14:39:39 +00:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
18b8abf60a remove the deprecated wiki macros 2016-05-27 05:52:23 +02:00
Vladimir Panteleev
38a6370788 Merge pull request #4303 from wilzbach/mref_phobos
use mref macro instead of link2
2016-05-24 03:12:08 +03:00
Joakim
d965b1aa64 Fix Android regressions: make sure all tests don't use the local directory and no unzip 2016-05-16 21:57:17 +05:30
Sebastian Wilzbach
89a2dd5f11 use mref macro instead of link2 2016-05-16 03:30:08 +03:00
Jack Stouffer
e216108eb2 Fixed long lines in std/file.d 2016-05-10 20:51:39 -04:00
Dmitry Olshansky
95e8b69d11 Merge pull request #4276 from nykytenko/master
Solaris: corrected getcwd call.
2016-05-07 16:57:51 +04:00
Ilya Yaroshenko
d0ef84f04a Merge pull request #4107 from BBasile/issue-11791
fix issue 11791 - std.file.write failed to write huge files
2016-05-06 08:01:13 +02:00
Basile Burg
2ff9afaeee fix issue 11791 - std.file.write failed to write huge files 2016-05-06 02:55:18 +02:00
Oleg Nykytenko
6dca37630f Solaris: getcwd buffer size changed. 2016-05-05 09:01:34 +03:00
Oleg Nykytenko
b7459ecbf8 Solaris: corrected getcwd call. 2016-05-02 20:48:51 +03:00
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
anonymous
863b251162 smoothen out differences between readLink and symlink
ElementType -> ElementEncodingType
template constraints -> static if
2016-04-26 15:25:56 +02:00
anonymous
831ddccdae code formattting 2016-04-26 15:25:56 +02:00
anonymous
dce9175467 rangify readLink and symlink
Removing @safe from the signatures so that attribute inference takes
care of things. There are @safe unittests already, ensuring that the
functions themselves don't do anything unsafe.

Replacing @trusted declarations with @trusted function literals. This
way it's more clear that the specific call is @trusted, not the called
function.
2016-04-26 15:25:56 +02:00