diff --git a/base/compiler/utilities.jl b/base/compiler/utilities.jl index b85cf5d3195e4..b11651a5d6845 100644 --- a/base/compiler/utilities.jl +++ b/base/compiler/utilities.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + ########### # generic # ########### diff --git a/base/reinterpretarray.jl b/base/reinterpretarray.jl index 5e79d13dd2b65..81a45af7bc33f 100644 --- a/base/reinterpretarray.jl +++ b/base/reinterpretarray.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + """ Gives a reinterpreted view (of element type T) of the underlying array (of element type S). If the size of `T` differs from the size of `S`, the array will be compressed/expanded in diff --git a/base/special/exp10.jl b/base/special/exp10.jl index 711da3b04549b..bf875542ef6d0 100644 --- a/base/special/exp10.jl +++ b/base/special/exp10.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # Method # 1. Argument reduction: Reduce x to an r so that |r| <= 0.5*log10(2). Given x, # find r and integer k such that diff --git a/contrib/add_license_to_files.jl b/contrib/add_license_to_files.jl index c0dcc0d89663b..b74fa66587f3f 100644 --- a/contrib/add_license_to_files.jl +++ b/contrib/add_license_to_files.jl @@ -18,6 +18,7 @@ const rootdirs = [ "../contrib", "../examples", "../src", + "../stdlib", "../test", ] @@ -35,7 +36,6 @@ const skipfiles = [ "../base/special/trig.jl", "../base/special/exp.jl", "../base/special/rem_pio2.jl", - "../base/linalg/givens.jl", # "../src/abi_llvm.cpp", "../src/abi_ppc64le.cpp", @@ -63,11 +63,11 @@ const skipfiles = [ ] const ext_prefix = Dict([ -(".jl", "# "), -(".sh", "# "), -(".h", "\/\/ "), -(".c", "\/\/ "), -(".cpp", "\/\/ "), + (".jl", "# "), + (".sh", "# "), + (".h", "// "), + (".c", "// "), + (".cpp", "// "), ]) const new_license = "This file is a part of Julia. License is MIT: https://julialang.org/license" @@ -136,7 +136,7 @@ function add_license_line!(unprocessed::Vector, src::AbstractString, new_license if ext in keys(ext_prefix) prefix = ext_prefix[ext] f = open(path, "r") - lines = readlines(f, chomp=false) + lines = readlines(f, keep=true) close(f) isempty(lines) && (push!(unprocessed, path); continue) isempty(old_license) || check_lines!(path, lines, old_license, prefix, true) diff --git a/examples/clustermanager/simple/UnixDomainCM.jl b/examples/clustermanager/simple/UnixDomainCM.jl index 4e96e69b63ef2..29eb4f1975720 100644 --- a/examples/clustermanager/simple/UnixDomainCM.jl +++ b/examples/clustermanager/simple/UnixDomainCM.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + using Distributed import Distributed: launch, manage, connect, exit diff --git a/examples/clustermanager/simple/test_simple.jl b/examples/clustermanager/simple/test_simple.jl index e0f472061ebdc..1f4adb60214f5 100644 --- a/examples/clustermanager/simple/test_simple.jl +++ b/examples/clustermanager/simple/test_simple.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + using Distributed cmanpath = joinpath(@__DIR__, "UnixDomainCM.jl") include(cmanpath) diff --git a/examples/embedding/LocalModule.jl b/examples/embedding/LocalModule.jl index 4c15dc9adf449..d782386285123 100644 --- a/examples/embedding/LocalModule.jl +++ b/examples/embedding/LocalModule.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__() module LocalModule diff --git a/src/llvm-gc-invariant-verifier.cpp b/src/llvm-gc-invariant-verifier.cpp index d29d763f1bc36..73a8542188f57 100644 --- a/src/llvm-gc-invariant-verifier.cpp +++ b/src/llvm-gc-invariant-verifier.cpp @@ -1,4 +1,5 @@ // This file is a part of Julia. License is MIT: https://julialang.org/license + // This LLVM pass verifies invariants required for correct GC root placement. // See the devdocs for a description of these invariants. diff --git a/src/support/analyzer_annotations.h b/src/support/analyzer_annotations.h index 0b96c884d133d..75236435dfb69 100644 --- a/src/support/analyzer_annotations.h +++ b/src/support/analyzer_annotations.h @@ -1,3 +1,5 @@ +// This file is a part of Julia. License is MIT: https://julialang.org/license + #ifdef __clang_analyzer__ #define JL_PROPAGATES_ROOT __attribute__((annotate("julia_propagates_root"))) diff --git a/stdlib/CRC32c/src/CRC32c.jl b/stdlib/CRC32c/src/CRC32c.jl index 5ba27801a4ffb..95489304b08b6 100644 --- a/stdlib/CRC32c/src/CRC32c.jl +++ b/stdlib/CRC32c/src/CRC32c.jl @@ -1,3 +1,4 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license __precompile__(true) diff --git a/stdlib/CRC32c/test/runtests.jl b/stdlib/CRC32c/test/runtests.jl index d672514496f18..33c9c514ebbea 100644 --- a/stdlib/CRC32c/test/runtests.jl +++ b/stdlib/CRC32c/test/runtests.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + using Test, Random using CRC32c diff --git a/stdlib/Dates/src/deprecated.jl b/stdlib/Dates/src/deprecated.jl index 8916633ecd26f..e12ff13be6804 100644 --- a/stdlib/Dates/src/deprecated.jl +++ b/stdlib/Dates/src/deprecated.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # 0.7 deprecations import Base.colon diff --git a/stdlib/Dates/test/adjusters.jl b/stdlib/Dates/test/adjusters.jl index 64252912c5153..3caf7ba5497c2 100644 --- a/stdlib/Dates/test/adjusters.jl +++ b/stdlib/Dates/test/adjusters.jl @@ -1,4 +1,4 @@ -#This file is a part of Julia. License is MIT: https://julialang.org/license +# This file is a part of Julia. License is MIT: https://julialang.org/license module AdjustersTest diff --git a/stdlib/Dates/test/runtests.jl b/stdlib/Dates/test/runtests.jl index 51f73ae4595b4..de063135427a9 100644 --- a/stdlib/Dates/test/runtests.jl +++ b/stdlib/Dates/test/runtests.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + module DateTests for file in readlines(joinpath(@__DIR__, "testgroups")) diff --git a/stdlib/LibGit2/src/deprecated.jl b/stdlib/LibGit2/src/deprecated.jl index a5afe65df2c7c..5e92ffe733865 100644 --- a/stdlib/LibGit2/src/deprecated.jl +++ b/stdlib/LibGit2/src/deprecated.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # BEGIN 0.7 deprecations # PR #22062 diff --git a/stdlib/LibGit2/src/gitcredential.jl b/stdlib/LibGit2/src/gitcredential.jl index c91407d9e3654..36d3d88b8f110 100644 --- a/stdlib/LibGit2/src/gitcredential.jl +++ b/stdlib/LibGit2/src/gitcredential.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + """ GitCredential diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl index 3ba30964f1ee2..841986584ac0b 100644 --- a/stdlib/LibGit2/test/libgit2.jl +++ b/stdlib/LibGit2/test/libgit2.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + module LibGit2Tests import LibGit2 diff --git a/stdlib/LibGit2/test/online.jl b/stdlib/LibGit2/test/online.jl index 42ffb01074adc..18b7b4e78571a 100644 --- a/stdlib/LibGit2/test/online.jl +++ b/stdlib/LibGit2/test/online.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + module LibGit2OnlineTests using Test diff --git a/stdlib/LibGit2/test/runtests.jl b/stdlib/LibGit2/test/runtests.jl index 69b88eb18fdc1..b133e3daf3154 100644 --- a/stdlib/LibGit2/test/runtests.jl +++ b/stdlib/LibGit2/test/runtests.jl @@ -1,2 +1,4 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + include("libgit2.jl") include("online.jl") \ No newline at end of file diff --git a/stdlib/LinearAlgebra/src/givens.jl b/stdlib/LinearAlgebra/src/givens.jl index 6569ac4aadc7a..f77f69cd01ca9 100644 --- a/stdlib/LinearAlgebra/src/givens.jl +++ b/stdlib/LinearAlgebra/src/givens.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + # givensAlgorithm functions are derived from LAPACK, see below abstract type AbstractRotation{T} end diff --git a/stdlib/Logging/test/runtests.jl b/stdlib/Logging/test/runtests.jl index 8419527be6c53..bc597f5fde7e1 100644 --- a/stdlib/Logging/test/runtests.jl +++ b/stdlib/Logging/test/runtests.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + using Logging import Logging: min_enabled_level, shouldlog, handle_message diff --git a/stdlib/Pkg/test/runtests.jl b/stdlib/Pkg/test/runtests.jl index 22ce9e53e88bf..036a76a73bb3f 100644 --- a/stdlib/Pkg/test/runtests.jl +++ b/stdlib/Pkg/test/runtests.jl @@ -1,2 +1,4 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + include("pkg.jl") include("resolve.jl") diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index 37be919a6d998..6b9adb1ae20b0 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + ## Code for searching and viewing documentation using Markdown diff --git a/stdlib/REPL/src/precompile.jl b/stdlib/REPL/src/precompile.jl index f43494168e2f7..9b95bd5bf46ed 100644 --- a/stdlib/REPL/src/precompile.jl +++ b/stdlib/REPL/src/precompile.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + function _precompile_() ccall(:jl_generating_output, Cint, ()) == 1 || return nothing precompile(Tuple{typeof(Base.__atreplinit), REPL.LineEditREPL}) diff --git a/stdlib/REPL/test/FakeTerminals.jl b/stdlib/REPL/test/FakeTerminals.jl index 1fe587b144642..6805cb9f4374d 100644 --- a/stdlib/REPL/test/FakeTerminals.jl +++ b/stdlib/REPL/test/FakeTerminals.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + module FakeTerminals import REPL diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index baa42a3a0d68f..11823c7b02ccd 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -1,4 +1,5 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license + using Test using REPL using Random diff --git a/stdlib/REPL/test/runtests.jl b/stdlib/REPL/test/runtests.jl index 548018ece9ce9..a7767e6ca49a9 100644 --- a/stdlib/REPL/test/runtests.jl +++ b/stdlib/REPL/test/runtests.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + module REPLTests include("repl.jl") end diff --git a/stdlib/Serialization/src/precompile.jl b/stdlib/Serialization/src/precompile.jl index 4cf8485578c01..d25f4945b1c9c 100644 --- a/stdlib/Serialization/src/precompile.jl +++ b/stdlib/Serialization/src/precompile.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + precompile(Tuple{typeof(Serialization.write_as_tag), Base.TCPSocket, Int32}) precompile(Tuple{typeof(Serialization.object_number), Core.TypeName}) precompile(Tuple{typeof(Serialization.serialize_array_data), Base.TCPSocket, Array{Int64, 1}}) diff --git a/stdlib/UUIDs/src/UUIDs.jl b/stdlib/UUIDs/src/UUIDs.jl index 9a8e9c19dba1f..591c24e23e5e6 100644 --- a/stdlib/UUIDs/src/UUIDs.jl +++ b/stdlib/UUIDs/src/UUIDs.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + module UUIDs using Random diff --git a/stdlib/UUIDs/test/runtests.jl b/stdlib/UUIDs/test/runtests.jl index 142c48547acae..164ff4d9c2b5e 100644 --- a/stdlib/UUIDs/test/runtests.jl +++ b/stdlib/UUIDs/test/runtests.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + using UUIDs, Random u1 = uuid1() diff --git a/test/depot/packages/9HkB/TCSb/src/Baz.jl b/test/depot/packages/9HkB/TCSb/src/Baz.jl index 1305094d42d67..a095136001b52 100644 --- a/test/depot/packages/9HkB/TCSb/src/Baz.jl +++ b/test/depot/packages/9HkB/TCSb/src/Baz.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__(true) module Baz import Foo, Qux diff --git a/test/depot/packages/SXm7/WLVn/src/Foo.jl b/test/depot/packages/SXm7/WLVn/src/Foo.jl index 9799fcefdd44c..01bd5581ed867 100644 --- a/test/depot/packages/SXm7/WLVn/src/Foo.jl +++ b/test/depot/packages/SXm7/WLVn/src/Foo.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__(true) module Foo import Bar, Baz, Qux diff --git a/test/deprecation_exec.jl b/test/deprecation_exec.jl index 9cf9846aa398e..0b68806668d20 100644 --- a/test/deprecation_exec.jl +++ b/test/deprecation_exec.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # Tests for deprecated functionality. # # These can't be run with --depwarn=error, so currently require special diff --git a/test/llvmpasses/alloc-opt.jl b/test/llvmpasses/alloc-opt.jl index 7e174dc8a9bcc..d52149d921e44 100644 --- a/test/llvmpasses/alloc-opt.jl +++ b/test/llvmpasses/alloc-opt.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # RUN: julia --startup-file=no %s | opt -load libjulia.so -AllocOpt -LateLowerGCFrame -S - | FileCheck %s isz = sizeof(UInt) == 8 ? "i64" : "i32" diff --git a/test/llvmpasses/alloc-opt2.jl b/test/llvmpasses/alloc-opt2.jl index c23444fb0abb7..c4085baa20818 100644 --- a/test/llvmpasses/alloc-opt2.jl +++ b/test/llvmpasses/alloc-opt2.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # RUN: julia --startup-file=no %s | opt -load libjulia.so -AllocOpt -S - | FileCheck %s isz = sizeof(UInt) == 8 ? "i64" : "i32" diff --git a/test/llvmpasses/safepoint_stress.jl b/test/llvmpasses/safepoint_stress.jl index 1900997a48244..358455056bc7e 100644 --- a/test/llvmpasses/safepoint_stress.jl +++ b/test/llvmpasses/safepoint_stress.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + # RUN: julia --startup-file=no %s | opt -load libjulia.so -LateLowerGCFrame -S - | FileCheck %s println(""" diff --git a/test/project/deps/Bar/src/Bar.jl b/test/project/deps/Bar/src/Bar.jl index 97f4bff76384c..e96ecafaab496 100644 --- a/test/project/deps/Bar/src/Bar.jl +++ b/test/project/deps/Bar/src/Bar.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__(true) module Bar import Baz, Foo diff --git a/test/project/deps/Foo1/src/Foo.jl b/test/project/deps/Foo1/src/Foo.jl index 12c820c173130..f072e873de375 100644 --- a/test/project/deps/Foo1/src/Foo.jl +++ b/test/project/deps/Foo1/src/Foo.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__(true) module Foo import Bar, Baz, Qux diff --git a/test/project/deps/Foo2.jl/src/Foo.jl b/test/project/deps/Foo2.jl/src/Foo.jl index b3d852d65ece2..18cf1c2bd4885 100644 --- a/test/project/deps/Foo2.jl/src/Foo.jl +++ b/test/project/deps/Foo2.jl/src/Foo.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__(true) module Foo import Qux diff --git a/test/project/deps/Qux.jl b/test/project/deps/Qux.jl index 075778bdb2c40..499153e6f6f1f 100644 --- a/test/project/deps/Qux.jl +++ b/test/project/deps/Qux.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + __precompile__(true) module Qux this = "Qux" diff --git a/test/reinterpretarray.jl b/test/reinterpretarray.jl index b334f341e83d7..c025cc0c0d2dd 100644 --- a/test/reinterpretarray.jl +++ b/test/reinterpretarray.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + using Test A = Int64[1, 2, 3, 4] diff --git a/test/specificity.jl b/test/specificity.jl index 1885fe2e90a41..bc56c9e9ddb45 100644 --- a/test/specificity.jl +++ b/test/specificity.jl @@ -1,3 +1,5 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + function args_morespecific(a, b) sp = (ccall(:jl_type_morespecific, Cint, (Any,Any), a, b) != 0) if sp # make sure morespecific(a,b) implies !morespecific(b,a)